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

Trying to fit Pearson3 probability distribution using scipy

I am trying to understand how to fit a probability distribution function, such as Pearson type 3, to a data set (specifically, mean annual rainfall in an area). I've read some questions about this, but I still miss something and the fitting doesn't…
Ohm
  • 2,312
  • 4
  • 36
  • 75
0
votes
0 answers

R: Convergence problems with numerical integration

Not sure if this numerical methods problem should really be here or in crossvalidated, but since I have a nice reproducible example I though I would start here. I am going to be estimating and fitting a bunch of distributions both to some large data…
0
votes
1 answer

Probability Distribution of batch in keras

I am trying to train a CNN model on imbalanced dataset. I wanted to know how well a batch approximates the distribution in the training dataset. Is there any parameter in an inbuilt function in keras which could be specified to maintain the same…
0
votes
1 answer

How to correctly calculate the MEDIAN of a probability function?

I am trying to calculate the exact median of a simple standard normal PDF in Python 36. The code looks like this: from scipy.stats import norm from pynverse import inversefunc mean = 'some_number' standard_deviation = 1 inverse_normal_pdf =…
Yudeg
  • 21
  • 5
0
votes
1 answer

Normal Distribution PDF R and Python with csv file

# Integrationsgewichte (später hinterfragen...) me.G5 = read.csv('xy.csv',sep=';',header=FALSE)[,2:3] me.x = me.G5[,1] me.w = me.G5[,2] int.x = c((me.x/2+.5)*0.1,0.1+(me.x/2+.5)*0.9,1+(me.x/2+.5)*9,10+(me.x/2+.5)*90,100+(me.x/2+.5)*900) int.w =…
0
votes
2 answers

Creating sequence logo for DNA aligned sequences

How to create a sequence logo for aligned DNA sequences? For the given sequences in Kevin Murphy book (chapter 2, figure 2.5), I am deriving logo using this wiki_link I am not getting expected results. DNA Sequences: a t a g c c g g t a c g g c…
0
votes
2 answers

How to programatically get parameter names and values in scipy

Is there any way to get the parameters of a distribution? I know almost every distribution has "loc" and "scale" but theres differences between them, for example alpha has "a", beta has "a" ,"b". What i want to do is programatically print(after…
Luis Leal
  • 3,388
  • 5
  • 26
  • 49
0
votes
2 answers

Plotting gamma distribution in R

Am trying to plot a gamma distribution histogram using R so i have gam(10, 0.5) I have previously calculated mean as 10* 0.5 = 5 So Am supposed to plot a histoigram of 100 observations with scale = 10 and shape = 0.5 So i have tried x <-…
Geoff
  • 6,277
  • 23
  • 87
  • 197
0
votes
1 answer

statsmodels - Builtin probability distributions

We can plot common probability distributions using Scipy module. However, is it possible to do the same task using Statsmodels library? For example - Scipy has inbuilt functions for Binomial distribution, Uniform distribution and as well as for…
sync11
  • 1,224
  • 2
  • 10
  • 23
0
votes
0 answers

KLdivergence returns infinitive

I have a dataset which has 683 samples and 9 features. I want to compare KLDivergence of two datasets for each column. originalAttribute = np.asarray(originalData[:, i]).reshape(row) histOriginal = np.histogram(originalAttribute,…
user3104352
  • 1,100
  • 1
  • 16
  • 34
0
votes
1 answer

Issue of precision when coding discrete distribution in c

I am relatively new to C and so when it comes to issues of precision I am always a bit worried. I am working with a rather larger code and at a specific point I need to select a value based off of a discrete probability distribution. Essentially…
Scott
  • 113
  • 4
0
votes
0 answers

Why is the area under a Probability Disstribution function as calculated from a cdf not equal to 1?

So, I have a set of probabilities (z_scaled) and I'm trying to plot the PDF of the distribution as well as the CDF. Now my code is as follows: cdf = np.cumsum(z_scaled) pdf = np.gradient(cdf) Now, the cdf looks like so: And the PDF, as calculated…
0
votes
1 answer

Generating numbers from probabilities in csv file in python

I have an excel file with different cases and about 75 events for each case. There is a probability of each event happening given each case. So the excel file looks like this: event1 event2 ... event75 case1 0.0343 0.0234 ... …
0
votes
0 answers

How to fit probability distribution to multi variate data in R or Python?

I have dataset of 250000 points which has 15 features. Each feature takes values from 0 to 100. So, I want to fit a probability distribution to this dataset to identify outliers like wrong data entry. For univariate there is fitdist in R, what…
curio17
  • 660
  • 1
  • 6
  • 15
0
votes
1 answer

Removing one edge from a directed graph G

What will happen if we remove one edge (new graph G') from a directed graph G? For example, does the probability distribution P that factorizes G also factorize G′? and what will happen if G and G′ were undirected graphs? Any help will be…