Questions tagged [probability-distribution]

A probability distribution is a function that defines the probability of occurrences of the different possible values of a variable.

What is it?

A probability distribution is a function that defines the probability of occurrences of the different possible values of a variable.

Typical examples of distributions are the uniform distribution in which each value has the same probability, the normal distribution in which the values around the avergage have a higher probability and the extreme values the lowest probability.

See also

315 questions
0
votes
1 answer

how to vectorize exponential probability function

I believe code below is somewhat correct implementation of this exponential heatmap function: def expfunc(image, landmark, sigma=6): #image = array of shape (512,512), landmark = array of shape (2,) a= np.sqrt(np.log(2)/2)/sigma # for i in…
Ode
  • 19
  • 1
  • 6
0
votes
0 answers

Distribute classes in a graph by preserving global probability distribution among neighbors

I want to create a graph to represent a network. Each node can be of 3 types: A, B, and C. I have an initial probability distribution that says that each node in the network has a certain probability of being: A, B, or C. However these probabilities…
0
votes
1 answer

Posterior distribution for randomized responses

This is a question from a book Think Bayes, and I cannot figure out how to compute the posterior distribution. Suppose you want to know how many people cheat on their taxes. If you ask them directly, it is likely that some of the cheaters will lie.…
Sanjay Verma
  • 1,390
  • 22
  • 40
0
votes
0 answers

mle failed to estimate the parameters with error code 100 for pareto

I am trying to fit a pareto distribution to the following data x <- c(5857.33154195937, 2352.13410311605, 5868.4139887638, 5084.43835650941, 5544.58859069637, 3469.38719024777, 5935.54817351679, 849.551931991455, 4804.65544410752,…
89_Simple
  • 3,393
  • 3
  • 39
  • 94
0
votes
1 answer

Non-normal sampling for card shuffling

I have a script that uses sample() to shuffle a pack of cards into four hands - Shown below. This script produces normally distributed hand splits. That is the distributions of the 13 cards in a suit across the four hands will be "4432" 21.6% of the…
Tech Commodities
  • 1,884
  • 6
  • 13
0
votes
1 answer

Tensorflow unnormalized log probabilities

I am using Tensorflow to create some probabilities. I am trying to estimate the unnormalized log probabilities, following the documentation in tensorflow: import tensorflow_probability as tfp tfd = tfp.distributions dist =…
0
votes
1 answer

Distribution of kruskal wallis under H0

i'm not sure, but i want to check it. Does the distribution of kruskal wallis under H0 is F(k-1,N-k) ? I think that's not true. I think it distrubution with chi square. Can anyone tell me if I'm right?
0
votes
1 answer

Use two set of data for likelihood of log_prob in tensorflow probability

I am new to tensorflow and trying to translate a STAN model into TFP. Here is my TFP model using JointDistributionCoroutineAutoBatched. def make_joint_distribution_coroutine(Depth,N_RNA): def model(): ## c1 prior c1 = yield…
0
votes
1 answer

Plotting an exponential function given one parameter

I'm fairly new to python so bare with me. I have plotted a histogram using some generated data. This data has many many points. I have defined it with the variable vals. I have then plotted a histogram with these values, though I have limited it so…
0
votes
2 answers

python: how do I draw a line graph of the following function?

I'm new to python and I am trying to draw a graph for the probability of normal distribution of 1000 samples with specific mean and variance. The probability function is: I have generated 1000 samples with: import numpy as np import…
0
votes
0 answers

Select a random element in a numpy matrix returning its index

I have a matrix which is shape=(3,3) and the rows represent probablity distributions. This is an example: distribution_probablities=np.array([[1/3,2/3,0], [0.5,0.2,0.3], [1,0,0]]) I…
0
votes
2 answers

How to perform exploitation,for genetic algorithm, in a binary string?

I have a binary vector of 32 bit. This vector represents an integer in my solution space. Now I want to perform exploitation in this vector for searching in the search space.I have learnt that I have to flip more bits around the LSB in the binary…
gag123
  • 357
  • 1
  • 2
  • 8
0
votes
2 answers

Generate a deterministic set of values from non-uniform distributions

Numpy has some routines like np.linspace that creates an array of evenly spaced numbers. Is there a similar way to generate non-evenly spaced numbers that follow a specific distribution like the normal or beta distribution? I know that there are…
0
votes
2 answers

Model leadtimes with a given probability distribution in Cplex

For my consolidation problem in Cplex, I want to make the travel time (leadtime) from origin terminal to gateway terminal 'emerge' with a given probability. The transportation from gateway to the final destination will then depend on this outcome.…
FrT
  • 17
  • 3