Package Biskit :: Package Statistics :: Module Density
[hide private]
[frames] | no frames]

Module Density

source code

Analyze a density distribution of values.

Classes [hide private]
  Density
Analyze a density distribution of values.
  Test
Test class

Functions [hide private]
float p_lognormal(x, alpha, beta)
Get the probability of x from a lognormal density distribution that is described by two parameters alpha and beta.
(float, float) logConfidence(x, R, clip=1e-32)
Estimate the probability of x NOT beeing a random observation from a lognormal distribution that is described by a set of random values.

Variables [hide private]
  test = Test()

Function Details [hide private]

p_lognormal(x, alpha, beta)

source code 

Get the probability of x from a lognormal density distribution that is described by two parameters alpha and beta. Alpha and beta are not the usual mean and standard dev of the lognormal distribution itself but are the mean and stdev of the distribution after log-transformation. The two parameters can hence be calculated from n sample values v:
 alpha = 1/n N.sum( ln(vi) )
 beta = N.sqrt( 1/(n-1) N.sum( ln(vi) - alpha )^2  )
Parameters:
  • x (float) - value
  • alpha (float) - mean of the log-transformed random variable
  • beta (float) - stdev of the log-transformed random variable
Returns: float
probability of x

logConfidence(x, R, clip=1e-32)

source code 

Estimate the probability of x NOT beeing a random observation from a lognormal distribution that is described by a set of random values. The exact solution to this problem is in Biskit.Statistics.lognormal.
Parameters:
  • x (float) - observed value
  • R ([float]) - sample of random values; 0 -> don't clip (default: 1e-32)
  • clip (float) - clip zeros at this value
Returns: (float, float)
confidence that x is not random, mean of random distrib.

Variables Details [hide private]

test

Value:
Test()