Normal Distribution

-Error The difference between a data point and a predicted or average value

-Standardize Subtract the mean and divide by the standard deviation

-z-score the result of standardizing an individual data point

-standard normal A normal distribution with mean = 0 and standard deviation = 1

-QQ plot A plot to visualize how close a sample distribution is to a specified distribution, e.g., the normal distribution.

A standard normal distribution is one in which the units on the x-axis are expressed in terms of standard devitions away from the mean. To compare data to a standard normal distribution, you subtract the mean and then divide by the standar deviation(normalization or standardization)

A QQ-Plot is used to visually determine how close a sample is to a specified distribution-In this case, the normal distribution

fig,ax =plt.subplots(figsize=(4,4))
norm_sample=stats.norm.rvs(size=100)
stats.probplot(norm_sample,plot=ax)

with the method scipy.stats.probplot

Quantile of normal distribution

Long-Tailed Distributions

The long tail is the colloquial name for a well-known feature of statistical distributions (Zipf, power-law, Pareto distributions and in general Lévy distributions). The feature is also known as heavy tails, power-law tails, or Pareto tails. These distributions are similar to the graph that accompanies these lines. In these distributions a large frequenct or high frecuency of "transactions" is followed by a low frequency or low amplitude of the gradually decreasing population. In many cases, the low frequency or low amplitude events-the long tail, represented here by the yellow portion of the graph-may comprise most of the graph

While the normal distribution is often appropiate and useful with respect to the distribution of errors and sample statistics, it typically does not characterize the distribution of raw data; or the distribution can be discrete, as with binomial data.

nflx = sp500px.NFLX
nflx = np.diff(np.log(nflx[nflx>0]))
fig,ax = plt.subplots(figsize=(4,4))
stats.probplot(nflx,plot=ax)

.

The black swan ||| SDWA

Student's t-Distribution

In probability and statistics, Student's t-distribution is a probability distribution that arises from the problem of estimating the mean of a normally distributed population when the sample size is small and the population standard deviation is unknown.

It appears naturally when performing Student's t-test for the determination of the differences between the parts of two populations when the standard deviation of a population is unknown and must be estimated from sample data.

differences in averages

  • Degrees of freedom A parameter that allows the t-distribution to adjust to different sample sizes, statistics, and number of groups

.

the standard treatment ||| Original paper

Binomial Distribution

  • Trial An event with a discrete outcome.
  • Succes (i) The outcome of interest for a trial.
  • Binomial Having two outcomes.
  • Binomial trial (Bernoulli trial) A trial with two outcomes
  • Binomial Distribution (Bernoulli Distribution) Distribution of number of successes in x trials

Fundamental to understanding the binomial distribution is the idea of a set of trials, each of which has two possible outcomes with defined probabilities.For example, flippping a coin 10 times is a binomial experiment with 10 trials, each trial having two possible outcomes(heads or tails);Such yes/no or 0/1 outcomes are termed binary outcomes, and they need not have 50/50 probabilities. The binomial distribution is the frequency distribution of the number of successes (x) in a given number of trials(n) with specified probability (p) of success in each trial. There is a family of binomial distribution, depending on the values of n and p. The binomial distribution would answer question like:

Binomial outcomes are important to model,since they represent, among other things, fundamental decisions(buy or don't buy, click or don't click, survive or die, etc.). with a large n, and provided p is not too close to 0 or 1, the binomial distribution can be approximated by the normal distribution.

The scipy.stats module implements a large variety of statistical distributions. For the binomial distribution, use the functions stats.binom.pmf and stats.binom.cdf

stats.binom.pmf(2, n=5, p=0.1)

stats.binom.cdf(2, n=5, p=0.1)

Chi-Square Distribution

The chi-square distribution is a special case of the gamma distribution and is one of the most widely used probability distributions in Statistical Inference, mainly in hypothesis testing and in the construction of confidence intervals. The chi-square distribution is the distribution of this statistic under repeated resampled draws from the null model
Error The difference between a data point and a predicted or average value

  • The chi-suqare distribution is typically concerned with counts of subjects or items falling into categories.
  • The chi-square statistic measures the extent of departure from what you would expect in a null model

The Lady Tasting Tea

F-Distribution

The F-distribution is used with experiments and linear models involving measured data. And the F-Statistic compares variation due to factors of interest to overall variation.

Introduction to Design and Analysis of Experiments

Poisson and related Distributions

Many processes produce events randomly at a given overall rate

  • lambda The rate(per unit of time or space) at which avents occur
  • Poisson distribution The frequency distribution of the number of events in sampled units of time or space
  • Exponential distribution The frequency distribution of the time or distance from one event to the next event
  • Weibull distribution A generalized version of the exponential distribution in which the event rate is allowed to shift over time

.For events that occur at a constant rate, the number of events per unit of time or space can be codeled as a poisson distribution. .You can also model the time or distance between one event and the next as an exponential distribution .A changing event rate over time can be modeled with the weibull distribution.

Poisson Distributions

The Poisson distribution tells us the distribution of events per unit of time or space when we sample many such units The key parameter in a Poisson distribution is \lambda. This is the mean number of events thtat occurs in a specified interval of time or space.(The variance for a poisson distribution is also \lambda)

stats.poisson.rvs(2,size=100)

Exponential distribution

Using the same parameter \lambda that we used in the Poisson distribution, we can also model the distribution of the time between events.

stats.expon.rvs(0.2,size=100)

A key assumption in any simulation study for either the poisson or exponential distribution is that the rate, \lambda, remains constants over the period being considered. This is rarely reasonable in a global sense; for example, traffic on roads or data networks varies by time of day and day of week.

Estimating the Failure Rate

The event rate \lambda is known or can be estimated from a prior data.If there is some data but not enough to provide a precise, reliable estimate of the rate, a goodness-of-fit test can be applied to various rate to determine how well they fit the observed data.

Weibull Distribution

The wibull distribution is an extension of the exponential distribution in which the event rate is allowed to change, as specified by a shape parameter \Beta.If beta>1,the probability of an event increases over time; if \beta<1, the probability decreases. Because the Weibull distribution is used with time-to-failure analysis instead of event rate,the sesecond parameter is expresed in terms of characteristic life, rather than in terms of the rate of events per intervales.the symbol used is \eta scale parameter.

Modern Engineering Statistics ||| Original paper