# 2.2 The gamma and chi-square distributions

 Page 1 / 1
This course is a short series of lectures on Introductory Statistics. Topics covered are listed in the Table of Contents. The notes were prepared by EwaPaszek and Marek Kimmel. The development of this course has been supported by NSF 0203396 grant.

## Gamma and chi-square distributions

In the (approximate) Poisson process with mean $\lambda$ , we have seen that the waiting time until the first change has an exponential distribution . Let now W denote the waiting time until the $\alpha$ th change occurs and let find the distribution of W . The distribution function of W ,when $w\ge 0$ is given by

$\begin{array}{l}F\left(w\right)=P\left(W\le w\right)=1-P\left(W>w\right)=1-P\left(fewer_than_\alpha _changes_occur_in_\left[0,w\right]\right)\\ =1-\sum _{k=0}^{\alpha -1}\frac{{\left(\lambda w\right)}^{k}{e}^{-\lambda w}}{k!},\end{array}$

since the number of changes in the interval $\left[0,w\right]$ has a Poisson distribution with mean $\lambda w$ . Because W is a continuous-type random variable, $F\text{'}\left(w\right)$ is equal to the p.d.f. of W whenever this derivative exists. We have, provided w >0, that

$\begin{array}{l}F\text{'}\left(w\right)=\lambda {e}^{-\lambda w}-{e}^{-\lambda w}\sum _{k=1}^{\alpha -1}\left[\frac{k{\left(\lambda w\right)}^{k-1}\lambda }{k!}-\frac{{\left(\lambda w\right)}^{k}\lambda }{k!}\right]=\lambda {e}^{-\lambda w}-{e}^{-\lambda w}\left[\lambda -\frac{\lambda {\left(\lambda w\right)}^{\alpha -1}}{\left(\alpha -1\right)!}\right]\\ =\frac{\lambda {\left(\lambda w\right)}^{\alpha -1}}{\left(\alpha -1\right)!}{e}^{-\lambda w}.\end{array}$

## Gamma distribution

The gamma function is defined by $\Gamma \left(t\right)=\underset{0}{\overset{\infty }{\int }}{y}^{t-1}{e}^{-y}dy,0

This integral is positive for $0 , because the integrand id positive. Values of it are often given in a table of integrals. If $t>1$ , integration of gamma fnction of t by parts yields

$\Gamma \left(t\right)={\left[-{y}^{t-1}{e}^{-y}\right]}_{0}^{\infty }+\underset{0}{\overset{\infty }{\int }}\left(t-1\right){y}^{t-2}{e}^{-y}dy=\left(t-1\right)\underset{0}{\overset{\infty }{\int }}{y}^{t-2}{e}^{-y}dy=\left(t-1\right)\Gamma \left(t-1\right).$

Let $\Gamma \left(6\right)=5\Gamma \left(5\right)$ and $\Gamma \left(3\right)=2\Gamma \left(2\right)=\left(2\right)\left(1\right)\Gamma \left(1\right)$ . Whenever $t=n$ , a positive integer, we have, be repeated application of $\Gamma \left(t\right)=\left(t-1\right)\Gamma \left(t-1\right)$ , that $\Gamma \left(n\right)=\left(n-1\right)\Gamma \left(n-1\right)=\left(n-1\right)\left(n-2\right)...\left(2\right)\left(1\right)\Gamma \left(1\right).$

However, $\Gamma \left(1\right)=\underset{0}{\overset{\infty }{\int }}{e}^{-y}dy=1.$

Thus when n is a positive integer, we have that $\Gamma \left(n\right)=\left(n-1\right)!$ ; and, for this reason, the gamma is called the generalized factorial .

Incidentally, $\Gamma \left(1\right)$ corresponds to 0!, and we have noted that $\Gamma \left(1\right)=1$ , which is consistent with earlier discussions.

## Summarizing

The random variable x has a gamma distribution if its p.d.f. is defined by

$f\left(x\right)=\frac{1}{\Gamma \left(\alpha \right){\theta }^{\alpha }}{x}^{\alpha -1}{e}^{-x/\theta },0\le x<\infty .$

Hence, w , the waiting time until the $\alpha$ th change in a Poisson process, has a gamma distribution with parameters $\alpha$ and $\theta =1/\lambda$ .

Function $f\left(x\right)$ actually has the properties of a p.d.f., because $f\left(x\right)\ge 0$ and

$\underset{-\infty }{\overset{\infty }{\int }}f\left(x\right)dx=\underset{0}{\overset{\infty }{\int }}\frac{{x}^{\alpha -1}{e}^{-x/\theta }}{\Gamma \left(\alpha \right){\theta }^{\alpha }}dx,$ which, by the change of variables $y=x/\theta$ equals

$\underset{0}{\overset{\infty }{\int }}\frac{{\left(\theta y\right)}^{\alpha -1}{e}^{-y}}{\Gamma \left(\alpha \right){\theta }^{\alpha }}\theta dy=\frac{1}{\Gamma \left(\alpha \right)}\underset{0}{\overset{\infty }{\int }}{y}^{\alpha -1}{e}^{-y}dy=\frac{\Gamma \left(\alpha \right)}{\Gamma \left(\alpha \right)}=1.$

The mean and variance are: $\mu =\alpha \theta$ and ${\sigma }^{2}=\alpha {\theta }^{2}$ .

Suppose that an average of 30 customers per hour arrive at a shop in accordance with Poisson process. That is, if a minute is our unit, then $\lambda =1/2$ . What is the probability that the shopkeeper will wait more than 5 minutes before both of the first two customers arrive? If X denotes the waiting time in minutes until the second customer arrives, then X has a gamma distribution with $\alpha =2,\theta =1/\lambda =2.$ Hence,

$p\left(X>5\right)=\underset{5}{\overset{\infty }{\int }}\frac{{x}^{2-1}{e}^{-x/2}}{\Gamma \left(2\right){2}^{2}}dx=\underset{5}{\overset{\infty }{\int }}\frac{x{e}^{-x/2}}{4}dx=\frac{1}{4}{\left[\left(-2\right)x{e}^{-x/2}-4{e}^{-x/2}\right]}_{5}^{\infty }=\frac{7}{2}{e}^{-5/2}=0.287.$

We could also have used equation with $\lambda =1/\theta$ , because $\alpha$ is an integer $P\left(X>x\right)=\sum _{k=0}^{\alpha -1}\frac{{\left(x/\theta \right)}^{k}{e}^{-x/\theta }}{k!}.$ Thus, with x =5, $\alpha$ =2, and $\theta =2$ , this is equal to

$P\left(X>x\right)=\sum _{k=0}^{2-1}\frac{{\left(5/2\right)}^{k}{e}^{-5/2}}{k!}={e}^{-5/2}\left(1+\frac{5}{2}\right)=\left(\frac{7}{2}\right){e}^{-5/2}.$

## Chi-square distribution

Let now consider the special case of the gamma distribution that plays an important role in statistics.

Let X have a gamma distribution with $\theta =2$ and $\alpha =r/2$ , where r is a positive integer. If the p.d.f. of X is
$f\left(x\right)=\frac{1}{\Gamma \left(r/2\right){2}^{r/2}}{x}^{r/2-1}{e}^{-x/2},0\le x<\infty .$
We say that X has chi-square distribution with r degrees of freedom, which we abbreviate by saying is ${\chi }^{2}\left(r\right)$ .

The mean and the variance of this chi-square distributions are

$\mu =\alpha \theta =\left(\frac{r}{2}\right)2=r$ and ${\sigma }^{2}=\alpha {\theta }^{2}=\left(\frac{r}{2}\right){2}^{2}=2r.$

That is, the mean equals the number of degrees of freedom and the variance equals twice the number of degrees of freedom.

In the fugure 2 the graphs of chi-square p.d.f. for r =2,3,5, and 8 are given.

the relationship between the mean $\mu =r$ , and the point at which the p.d.f. obtains its maximum.

Because the chi-square distribution is so important in applications, tables have been prepared giving the values of the distribution function for selected value of r and x ,

$F\left(x\right)=\underset{0}{\overset{x}{\int }}\frac{1}{\Gamma \left(r/2\right){2}^{r/2}}{w}^{r/2-1}{e}^{-w/2}dw.$

Let X have a chi-square distribution with r =5 degrees of freedom. Then, using tabularized values,

$P\left(1.145\le X\le 12.83\right)=F\left(12.83\right)-F\left(1.145\right)=0.975-0.050=0.925$

and $P\left(X>15.09\right)=1-F\left(15.09\right)=1-0.99=0.01.$

If X is ${\chi }^{2}\left(7\right)$ , two constants, a and b , such that $P\left(a , are a =1.690 and b =16.01.

Other constants a and b can be found, this above are only restricted in choices by the limited table.

Probabilities like that in Example 4 are so important in statistical applications that one uses special symbols for a and b . Let $\alpha$ be a positive probability (that is usually less than 0.5) and let X have a chi-square distribution with r degrees of freedom. Then ${\chi }_{\alpha }^{2}\left(r\right)$ is a number such that $P\left[X\ge {\chi }_{\alpha }^{2}\left(r\right)\right]=\alpha$

That is, ${\chi }_{\alpha }^{2}\left(r\right)$ is the 100(1- $\alpha$ ) percentile (or upper 100a percent point) of the chi-square distribution with r degrees of freedom. Then the 100 $\alpha$ percentile is the number ${\chi }_{1-\alpha }^{2}\left(r\right)$ such that $P\left[X\le {\chi }_{1-\alpha }^{2}\left(r\right)\right]=\alpha$ . This is, the probability to the right of ${\chi }_{1-\alpha }^{2}\left(r\right)$ is 1- $\alpha$ . SEE fugure 3 .

Let X have a chi-square distribution with seven degrees of freedom. Then, using tabularized values, ${\chi }_{0.05}^{2}\left(7\right)=14.07$ and ${\chi }_{0.95}^{2}\left(7\right)=2.167.$ These are the points that are indicated on Figure 3.

what is equilibrium
it is intersect point of economics line in graph, but everytime not graph
Ahmet
it is the intersection point of supply and demand curves
tesfie
GDP is domestic gross product. refer my site amanchabukswar.wordpress.com
Hi everyone
AWOYEMI
hello lovely where am I?
Becky
Good morning
AWOYEMI
morning
Daniel
hi dear bro
tesfie
why does a firm continue operating at a breakeven point
to retain its customers for later coming profits.
tesfie
this is because the firm's revenu is covering the variable cost so the firm should continuos business
Florencia
and zero profit is a normal profit which covers entrepreneur's profit along with recovering wages, interest and rent.
Farooq
what economic trend can we expect after lifting of 10 year long sanctions in an national economy?
difference between change in demand and change in quantity demanded
how
kumar
how to change
kumar
For a demand with repect to price. change in demand refers to the shifting of demand curve, where as change in quantity demanded means movement along the given demand curve.
Farooq
According to lional Robbins how did he explain economics
He defined economics as a science which studies human behavior as a relationship between ends and scares which has alternative uses.
Emmanuel
What is economics
why are some countries producing inside the ppf
prove or disprove that balance of trade of trade deficit is a cause of an abnormal demand curve?
what's the fixed cost at output zero
fixed cost stay the same regardless of the level of output
Luka
example; electricity bill is fixed cost....but when the machinery plant is not active and perhaps so offices are locked up due to unforseen circumstances..... definitely the electric nose dive.... that is a reduction in fixed right? am just saying hope am making a point Luke?
klevic
what are the differences between change in demand and change in quantity demand
I think change in demand has to do with change from one product to another product....while change in quantity demand has to do with change in terms of units but same product....maybe due price change most especially, seasonal reasons too.
klevic
change in demand has to do with price of that commodity why change in quantity demand has to do with shift an has to do with other factor other than price
FIDELIS
what is consumers behaviour
i think it means the reaction expected of consumers in respect of changes in economic activities... most especially changes made by producers~wholesalers~retailers
klevic
importance of income
Tfor settlement of debt. For purchases. For payment of bills. For daily transactions. For social & recreational enjoyment. For business purposes etc
Oyetunde
thanks
Emmanuel
For investment purposes For security purposes For purpose of forecasting & strategizing.
Oyetunde
what is the real definition of economics
Economics is the study of the use and allocation of (scarce) resources
demsurf
Jegede, what is the "non" real definition of economics then?
Ernest
Economics is a study of how human use limited resources to fulfil their unlimited want
Musa
the study of how a society use scarce factors of production efficiently so as meet aggregate social demand
Marc
what is oligopoly?
Sailo
Oligopoly can be defines as a market where by there is only tmo or more sellers of a commodity
Paamat
Sory not tmo but two
Paamat
incidence of production there is a choice do you agree? justify
What is incidence of production? do u mean incidence of tax?
Aryeetey
Jeannette has $5 and$10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
What is the expressiin for seven less than four times the number of nickels
How do i figure this problem out.
how do you translate this in Algebraic Expressions
why surface tension is zero at critical temperature
Shanjida
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
s.
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Got questions? Join the online conversation and get instant answers!