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
2 answers

An R program to count the number of ones after simulating a fair dice

I want to simulate an experiment where you throw a fair dice 100 times and count the number of ones. I want to repeat this experiment 10^5 times and save the outcomes. Here is my code to throw a dice n times dice <- function(n) { …
JaredJoss
  • 19
  • 3
0
votes
1 answer

Random boolean mask sampled according to custom PDF in Tensorflow

I am trying to generate a random boolean mask sampled according to a predefined probability distribution. The probability distribution is stored in a tensor of the same shape as the resulting mask. Each entry contains the probability that the mask…
Hannodje
  • 11
  • 3
0
votes
3 answers

Am i miss-using numpy random number generator for bootstrapping?

I attempted to write some code to create a bootstrap distribution and, although it compiles, I'm not sure it is working correctly. Some background: A student at the school where I teach has been systematically finding the combination to the locks on…
0
votes
1 answer

Probability Distribution

I am reading this article (http://www.ams.org/publicoutreach/feature-column/fc-2018-12) and I am having a hard time understanding one part: "On this set of paths, we introduce a probability distribution where the probability of each path is…
0
votes
1 answer

Probability Distribution like x^2

I searched a while and could't find any probability distribution that fits my needs. The Distribution should look something like the function c1 * x^2 + c2. The closest I could find in numpy is the Beta Distribution with alpha=0.5 and beta=0.5. But…
Marvin K
  • 334
  • 3
  • 14
0
votes
1 answer

Probability Density Function using Python

I have a data set which has values in the range of 1e-2 and 1e-3. I have the following code to obtain the values and plot the distribution. def get_pdf(data): a = np.array(data) ex = st.gaussian_kde(a) x = np.linspace(0, max(data),…
0
votes
2 answers

Plotting the area under the curve of various distributions in R

Suppose I'm trying to find the area below a certain value for a student t distribution. I calculate my t test statistic to be t=1.78 with 23 degrees of freedom, for example. I know how to get the area under the curve above t=1.78 with the pt()…
BLP92
  • 145
  • 2
  • 10
0
votes
1 answer

Fitting a lognormal distribution to the data and performing Kolmogorov-Smirnov test in Python and R

I am fitting my data to the lognormal, and I do the KS test in Python and R and I get very different results. The data are: series 341 291 283 155 271 270 250 272 209 236 295 214 443 632 310 334 376 305 216 339 In R the code is: fit =…
user8270077
  • 4,621
  • 17
  • 75
  • 140
0
votes
0 answers

Converting a binary array into probability distribution

I have a 2d binary array indicating the presence of half-channels at a particular coordinate (0=not present, 1=present). I need to convert this array into a probability distribution to plot on a map of the globe using matplotlib. I tried dividing…
0
votes
0 answers

Create sample of data from a. data set whose probability distribution closely fits PD of column another dataset

I have one table with ID and age. Let this be table 1. Rows in table 1 are 1000. I have table 2 with 10000 rows. I need to select 1000 rows from table 2 such that the table2.age has same probability distribution as table1.age. Is there any way to do…
0
votes
1 answer

3D Probability Density Plots in Python

I am working on a data set consisting of 'pulse length' values and 5 or 6 'voltage values' corresponding to each of the pulse lengths. The first value is pulse length followed by voltages. Find the table below. 15 -56V -47V -53V -50V …
Vishvachi Sinha
  • 147
  • 1
  • 4
  • 10
0
votes
0 answers

Sampling distribution Normal Approximation Misfit

I was trying to simulate "Sampling Distribution of Sample Proportions" using Python. I tried with a Bernoulli Variable as in example here The crux is that, out of large number of gumballs, we have yellow balls with true proportion of 0.6. If we take…
0
votes
3 answers

Sample Distribution Simulation not resulting in Normal

I was trying to simulate "Sampling Distribution of Sample Proportions" using Python. I tried with a Bernoulli Variable as in example here The crux is that, out of large number of gumballs, we have yellow balls with true proportion of 0.6. If we take…
0
votes
0 answers

Normal probability plot for LogNormal and Weibul data in python

checking this code I was wondering , If I have defined my lognormal plot already, then how would I draw the normal probability plot for my lognormal data ? should the x be defined the same way in the mentioned code ? This is my data = [336256,…
0
votes
1 answer

Discrete distribution not symmetrical

I'm trying to sample a discrete distribution using the std::discrete_distribution function. Here is a mwe: // discrete_distribution #include #include int main() { const int nrolls = 10000; // number of experiments const int…
kηives
  • 214
  • 2
  • 7