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

Measuring the overlap between two probability distribution

I have many probability distributions, I need to compute the amount of overlap between two probability distributions. I don't know the type of distribution since it really depends on the data itself. My question is what appropriate approach that…
1
vote
1 answer

scipy.stats attribute `entropy` for continuous distributions doesn't work manually

Each continuous distribution in scipy.stats comes with an attribute that calculates its differential entropy: .entropy. Unlike the normal distribution (norm) and others that have a closed-form solution for entropy, other distributions have to rely…
1
vote
1 answer

Why doesn't Johnson-SU distribution give positive skewness in scipy.stats?

The code below maps the statistical moments (mean, variance, skewness, excess kurtosis) generated by corresponding parameters (a, b, loc, scale) of the Johnson-SU distribution (johnsonsu). For the range of loop values specified in my code below, no…
develarist
  • 1,224
  • 1
  • 13
  • 34
1
vote
2 answers

Python mode function gives error for real-valued vector: No unique mode; found 2 equally common values

Why can't statistics.mode find the mode for a normally distributed (therefore, unimodal) random variable, but works fine for vectors containing integers? import numpy as np from numpy.random import rand,randn import statistics as st y =…
develarist
  • 1,224
  • 1
  • 13
  • 34
1
vote
4 answers

How to customize numpy.random.normal() so that the sum of the probabilities in a row doesn't exceed 1?

I want to generate a normal (probability) distribution using numpy.random.normal(), where the sum of the probabilities in a row (over all columns) must be 1. I used the following code to generate a sample 4 by 3 probability matrix: mu, sigma = 0.5,…
1
vote
0 answers

Problems with multiple parameters when defining a function to covert pdf to cdf

I am supposed to define a function that can take pdf function as input and return a CDF function (if the input is a vector, then return empirical CDF). It is required that I should enable varying parameters. However, the function integrate in r only…
1
vote
1 answer

Given a exponential probability density function, how to generate random values using the random generator in Excel?

Based on a set of experiments, a probability density function (PDF) for an exponentially distributed variable was generated. Now the goal is to use this function in a Monte carlo simulation. I am vaguely familiar with PDF's and random generator,…
1
vote
0 answers

Total Variation Distance for continuous distributions in Python(or R)

I would like to calculate the total variation distance(TVD) between two continuous probability distributions. I would like to point out that while there are two relevant questions(see here and here), they are both working with discrete…
cgss
  • 233
  • 2
  • 10
1
vote
0 answers

PYMC3 Switchpoint Analysis

I'm attempting to locate a switchpoint and getting some extremely high values for my posteriors. Specifically lambda_1 and tau don't seem to make much sense. The dataset looks like this: I've been using a method similar to the cellphone data…
blintster
  • 133
  • 1
  • 7
1
vote
1 answer

How can I assign a value picked from a list to a df column based on a probability distribution?

import pandas as pd d={'Country':['Algeria', 'France', 'Italy']*10, 'Input category':[1,2]*15, 'Output category':[0,0,0]*10} df=pd.DataFrame(d) df.sort_values(['Country', 'Input category']).reset_index(drop=True) Country Input category Output…
alg
  • 13
  • 3
1
vote
1 answer

How can I implement Maxwell's distribution?

I am given the following problem to solve (This text is translated from Russian. So, there may be some translation issues): ... Another method to draw from the normal distribution is to draw two independent random numbers from the uniform…
user366312
  • 16,949
  • 65
  • 235
  • 452
1
vote
1 answer

Generate probability distribution or smoothing plot from points containing probabilities

I have points which include the probability on the y-axis and values on the x-axis, like: p1 = [[0.0, 0.0001430560406790707], [10.0, 6.2797052001508247e-13], [15.0, 4.8114669550502021e-06], [20.0, 0.0007443231772534647], [25.0,…
1
vote
1 answer

How to get this probability outcome in R?

New to R. Not sure how to go about this problem. Essentially I want to create a Monte Carlo simulation. However this is how it's supposed to go: There are only 3 people (A,B,C) And only come into contact once in this order: (A-->B) (B-->C). Starting…
1
vote
2 answers

PDF and CDF for Biased die using Matlab with Central Limit Theorem

I am trying to plot the PDF and CDF for a biased die roll for 10^4 samples using Central Limit Theorem.(CLT) The die is biased or unfair where even sides are twice as likely as odd sides. Here is the diefaces = [1,3,2,4,6,2].What can I use in Matlab…
1
vote
2 answers

Python seaborn.distplot returning count instead of probability

I have a pandas series x: 0 -0.000069 1 -0.000059 2 -0.000025 3 -0.000021 4 -0.000021 ... 1036 0.000032 1037 0.000033 1038 0.000052 1039 0.000055 1040 0.000092 Name: c, Length: 1041, dtype:…
jstaxlin
  • 517
  • 4
  • 18