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

Fit a distribution line in a histogram on Matlab

This is my code and the result I got. Something is not right — I used histfit(cntH,NumBins,'kernel'), and I was expecting the distribution line to start from zero and fit into the bars How can I fix that? clear all clc % yG = total load yH %…
0
votes
2 answers

How can I change the value in list using probability distribution?

I have list of numbers: h=[5, 6, 5, 6, 6, 6, 6, 6]. I have to use probability distribution to give diversity in this list 'h'. How can I add additional value between 0.3-2 for each number in the list by using probability distribution? so I will get…
jinha kim
  • 177
  • 5
0
votes
1 answer

What is actually going on in R -the statistics behind rbinom(3, 10, 0.75)?

What is actually going on in R (the statistics behind rbinom(3, 10, 0.75)? I know the 3 is the number of observations, the 10 is the number of trials and 0.75 is the probability of success). The first result from running the R code…
0
votes
0 answers

How to add a gaussian blur with a real gaussian shape on an image with Python

Let's say I have an image as the following 2D arrays: img = np.array([ [0, 0, 0, 1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0], [0,…
Lionel
  • 331
  • 1
  • 2
  • 14
0
votes
0 answers

Is there any Pseudocode or examples on how to implement NORMSDIST function of Excel?

Does anyone have some information or either some equations on how to implement NORMSDIST or NORM.S.DIST()? There is an equivalent of NORMSDIST in Matlab, and there are libraries in Python and Java, I am trying to implement it in PHP, so some pure…
jAdex
  • 472
  • 1
  • 5
  • 15
0
votes
1 answer

Tracking a biased coin flip experiment - Binomial distribution in python

There is a 15% chance of getting heads. 85% chance of getting tails. I want to see how many coin flips it will take me to get a heads. Everytime I flip a coin, I want to put that number in an empty list stating the number of tries it took me to flip…
jhelpz
  • 11
  • 2
0
votes
1 answer

Calculate effective diffusion coefficient

I need to compute the drift velocity ( v=d/dt[r(t)] ) and the effective diffusion coefficient (Deff=d/dt[r(t)^2]-d/dt[r(t)]^2 ) from random trajectories for the case of Brownian motion over a periodic potential. As a mere example assume I have an…
0
votes
4 answers

Binomial Distribution using scipy.stats package

In each of 4 different competitions, Jin has 60% chance of winning. Assuming that the competitions are independent of each other, what is the probability that: Jin will win at least 1 race. Binomial Distribution Parameters: n=4 p=0.60 Display…
rohit Rohit
  • 11
  • 1
  • 1
  • 1
0
votes
1 answer

Copula result in R

I have a table of two column, it consist of an already computed index for 2 variables, a simple is quoted as following: V1, V2 0.46,1.08 0.84,1.05 -0.68,0.93 -0.99,0.68 -0.87,0.30 -1.08,-0.09 -1.16,-0.34 -0.61,-0.43 -0.65,-0.48 0.73,-0.48 In…
0
votes
1 answer

How to generate datasets and probability distributions on a sphere

I need to generate random datasets on a n-sphere. I have already managed to generate a uniform dataset by sampling points from a normal distribution and normalising them. i.e: values = np.random.randn(samples,k) for i in range (0,samples)…
Alfred
  • 503
  • 1
  • 5
  • 20
0
votes
1 answer

How the standard normal distribution works in practice in NumPy and PyTorch?

I have two points to ask about: 1) I would like to understand what is precisely returned from the np.random.randn from NumPy and torch.randn from PyTorch. They both return a tensor with random numbers from a normal distribution with mean 0 and std…
Paulo Mann
  • 55
  • 1
  • 6
0
votes
2 answers

Color-coded PMF with legend in ggplot2

My goal is to produce two overlapping PMFs of binomial distributions using ggplot2, color-coded according to colors that I specify, with a legend at the bottom. So far, I think I have set up the data frame right. successes <-…
Dave
  • 314
  • 2
  • 13
0
votes
1 answer

How to generate non-linear dependence between variables without correlation?

I am having trouble generating this data set for my dissertation from the following distribution. My attempt results in this data set which looks more independent. I cannot seem to spot where I am going wrong. Could somebody help me out? Here is the…
0
votes
1 answer

Constructing discrete table-based CPDs in tensorflow-probablity?

I'm trying to construct the simplest example of Bayesian network with several discrete random variables and conditional probabilities (the "Student Network" from Koller's book, see 1) Although a bit unwieldy, I managed to build this network using…
John Doe
  • 800
  • 6
  • 9
0
votes
1 answer

How can I generate a random value from a distribution that is constrained by another random value from a separate probability distribution?

I have two probability distributions, a beta distribution and a lognormal distribution. What I want to do is draw a random value from within my beta distribution and based on where that value is in terms of a standard deviation range, then I also…