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
1
vote
1 answer

How to obtain an equation for a line fitted to data

I am trying to obtain an equation for a function fitted to some histogram data, I was thinking of trying to do this by fitting a rational function as the data doesn't resemble any distribution recognisable by myself. The data is experimental, and I…
1
vote
1 answer

Expected values from copula in R

I have a copula representing the dependence between two variables X and Y. I want to compute the following formula: E(X|Y≤1%). It is the expected value of X conditional on Y being lower than 1%. I see that a somewhat similar question was asked there…
Sabotar
  • 77
  • 1
  • 6
1
vote
1 answer

How to make a function that gives probabilities in a Geometric distribution?

I'm using MATLAB to make a function that returns the probability mass function (PMF) for a Geometric distribution when I enter the values of p, q, and the number of attempts (x) as the inputs. My function: function Probability = Geometric(p, q,…
1
vote
0 answers

CDF for each bin from 2D plot from a 3D scatter data

I have a 3D scatter plot of 3 variables x, y, z. I want to create bins in 2D space of x and y. Further i want to plot cdf for samples in each bin for z. I have tried using hist2d in python but it gives counts for x and y variables. mean = [0,…
1
vote
0 answers

Probability distribution of throwing 100 dice using Gaussian/Normal distribution bell curve

I have a program that simulates a fair dice 100 times. Using this program I need to have a bell curve over the histogram showing normal/Gaussian distribution. In my code The variable representing the outcome of the experiment is z. The definition…
1
vote
1 answer

Groupwise Probability Distribution

I have a dataframe df of gps points. I had geographical region that I divided into grid. Each grid cell is represented by pair of two columns (row, col) in a dataframe. The GPS points are labelled with their transportation modes. I want to calculate…
Asif Khan
  • 1,228
  • 1
  • 11
  • 22
1
vote
1 answer

How to use uniform distribution to see central limit theorem in action?

I would like to use MATLAB to visualize the Central Limit Theorem in action. I would like to use rand() to produce 10 samples of uniform distribution U[0,1] and compute their average, then save it to a matrix 'Mat'. I would then use a histogram to…
1
vote
1 answer

Unit-testing a probability distribution with conditionals

I have a function choose(elems) -> elem that calls rand() which makes it non-deterministic. To be able to better test this, I figured that I could split this function in two, generate_choices(elems, ...) -> distribution choose(distribution) ->…
sshine
  • 15,635
  • 1
  • 41
  • 66
1
vote
0 answers

Kulback Leibler divergence between two vectors of words

I have two vectors of words, for ex: v1 = ["today", "rainy", "weather", "storm"] v2 = ["prediction", "sunny", "high", "temperature"] I would like to compute the Kulback Leibler divergence between these two vectors. How can I do that in Python?…
Crista23
  • 3,203
  • 9
  • 47
  • 60
1
vote
1 answer

Generate empirical/user defined distribution with desired mean and std

I have generated a demand distribution based on the actual demand data of one year. This distribution is non-normal or similar to any theoretical distributions. I use this empirical demand distribution for a simulation study. In current empirical…
1
vote
2 answers

One-dimensional earth mover's distance in BigQuery/SQL

Let P and Q be two finite probability distributions on integers, with support between 0 and some large integer N. The one-dimensional earth mover's distance between P and Q is the minimum cost you have to pay to transform P into Q, considering that…
Ted
  • 972
  • 2
  • 11
  • 20
1
vote
3 answers

Matlab: generate random numbers from custom made probability density function

I have a dataset with 3-hourly precipitation amounts for the month of January in the period 1977-1983 (see attachment). However, I want to generate precipitation data for the period 1984-1990 based upon these data. Therefore, I was wondering if it…
1
vote
1 answer

The probability distribution of two words in a file using java 8

I need the number of lines that contain two words. For this purpose I have written the following code: The input file contains 1000 lines and about 4,000 words, and it takes about 4 hours. Is there a library in Java that can do it faster? Can I…
1
vote
2 answers

Matlab cannot compute an infinite integral?

I am studying Stochastic calculus, and occasionally we need to compute an integral (from -infinity to +infinity) for some complex distribution. In this case, it was with the answer on the right. This is the code I put into Matlab (and I have the…
1
vote
2 answers

Hypergeometric simulation, picking all at once by shuffling once gives wrong result

I'm simulating the model where there are N marbles, out of which K marbles are good. We pick n marbles out of N marbles and are asked for the probability that exactly k out of the n picked ones are good. I did this two ways: In both I generated an…