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

How would I learn parameters of a beta distribution in TensorFlow Probability?

I'm trying to use TensorFlow Probability to learn the alpha and beta parameters of a beta distribution. I can't get it to work for some reason - the loss is all NaN values. Here's what I have: from scipy.stats import beta import pandas as pd import…
0
votes
0 answers

How can I write a 2D MATLAB function which smoothes an image via a 2D Gaussian Cumulative Function that where its means are is determined by the user?

How can I write a 2D gaussian cumulative matlab function that gets applied to an input 2D binary image. The mean of the gaussian cumulative is on a particular selected curved line which will be given as an input. So the inputs of the function…
0
votes
1 answer

Matrix indexing

I have a matrix of 3 columns and 56 rows. Now I want to perform an operation on each of the (i,j) elements in this matrix and update the value in another pre-defined matrix of 3 columns and 56 rows. A little snippet of my data is miss_geno_probs …
0
votes
1 answer

how to plot multiple probability distributions for negative binomial distribution in one plot

This plot shows multiple Poisson distributions for lambda = 1:10): I tried running the code for Poisson and tried tweaking it to get plots for NB and generalized Poisson distributions but nothing worked.
0
votes
0 answers

Matlab histogram plotting two separate datasets with the same PDF, different colors

I have two vectors, one is ~10x larger than the other. I'm trying to represent both on a probability distribution function histogram where each vector has a different color, but the PDF applies to the entire dataset... If I use histogram(data), the…
Andrew M
  • 119
  • 6
0
votes
0 answers

Finding optimal probability distribution for data in Python

I am trying to determine the goodness of fit of a probability distribution. The following code finds the parameters of a gamma distribution that fits the data, which is sampled from a normal distribution. How do you determine the goodness of fit,…
Andrew
  • 281
  • 3
  • 15
0
votes
0 answers

Find best probability distribution to fit your data in Python

I am trying to find the best distribution to fit data. This the code I have written. It generates a random sample of 100 normal random variables and uses the fitter module of Python to determine the best distribution. However, I want to add 2…
Andrew
  • 281
  • 3
  • 15
0
votes
0 answers

how to add errorbars() on the right spot in pre-existing log-log plot?

I have a corner plot with posterior probability distributions subplots from a minimisation function. on the x and y axis I have my different parameters, and then the contour hex plot is the distribution. plt.subplot(n_params, n_params, n_params * (j…
0
votes
1 answer

How to use np.cumsum to replicate the output of scipy.stats.expon.cdf?

For context, I'm trying to understand how to use np.cumsum to replicate scipy.stats.expon.cdf because I need to write a function compatible with scipy.stats.kstest which is not one of the distributions already available in scipy.stats. I am having…
0
votes
1 answer

Probability distribution of results from one, two and more draws

I am learning python and I found something not intuitive from my perspective. I was trying to print Gausses curve, based on output from lottery. In that program I can set draw range, number of draws in one game and number of games. I sum results of…
0
votes
1 answer

How to get bivariate normal probability distribution with specified standard deviation and angle in python

I want to get a bivariate normal probability distribution(hereafter referred to as BNPD) from ellipse parameters. As shown in the illustraion below, the length of the major axis of the ellipse will be taken as 3 times the standard deviation of BNPD,…
0
votes
0 answers

Minimum of subexponential random variables

It is known that if independent random variables X and Y have common subexponential distribution F, then distribution of their minimum min{X,Y} is also subexponential. The proof can be found in Theorem 1 of Geluk "Some closure properties for…
0
votes
1 answer

Scipy.Stats Error. Why is the function stats.combine_pvalues not accepting my weights for Stouffer method?

I have two dictionaries, import scipy.stats import numpy as np import pandas as pd exp_pvalues={'SC_1': array([0.96612999, 0.30348366]), 'SC_2': array([0.66871158, 0.0011381 ]), 'SC_3': array([0.66871158, 0.0011381 , 0.96612999, 0.30348366]), …
d3hero23
  • 380
  • 1
  • 12
0
votes
0 answers

Cauchy vs Skewed Cauchy Distribution

This says that the Cauchy distribution is distribution of the ratio of two independent normally distributed random variables with mean zero. The note says the Skewed Cauchy Distribution is a generalization of the Cauchy distribution. It has a single…
0
votes
0 answers

Predicting a result from an imbalanced distribution

Hi Below is the sample dataset from a quality control test result of electronic parts: UnderTesting=array([47098, 46729, 45612, 43297, 40085, 36365, 32562, 28947, 25992, 23615, 21475, 19964, 18952, 18138, 17393, 16659, 16117, 15656, …
SA_H
  • 35
  • 7