Skip to content Skip to navigation

Connexions

You are here: Home » Content » THE GAMMA AND CHI-SQUARE DISTRIBUTIONS

Navigation

Recently Viewed

This feature requires Javascript to be enabled.

THE GAMMA AND CHI-SQUARE DISTRIBUTIONS

Module by: Ewa Paszek. E-mail the author

User rating (How does the rating system work?)
Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

:
(0 ratings)

Summary: 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 Ewa Paszek and Marek Kimmel. The development of this course has been supported by NSF 0203396 grant.

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

GAMMA AND CHI-SQUARE DISTRIBUTIONS

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

F( w )=P( Ww )=1P( W>w )=1P( fewer_than_α_changes_occur_in_[ 0,w ] ) =1 k=0 α1 ( λw ) k e λw k! , F( w )=P( Ww )=1P( W>w )=1P( fewer_than_α_changes_occur_in_[ 0,w ] ) =1 k=0 α1 ( λw ) k e λw k! ,

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

F'( w )=λ e λw e λw k=1 α1 [ k ( λw ) k1 λ k! ( λw ) k λ k! ] =λ e λw e λw [ λ λ ( λw ) α1 ( α1 )! ] = λ ( λw ) α1 ( α1 )! e λw . F'( w )=λ e λw e λw k=1 α1 [ k ( λw ) k1 λ k! ( λw ) k λ k! ] =λ e λw e λw [ λ λ ( λw ) α1 ( α1 )! ] = λ ( λw ) α1 ( α1 )! e λw .

Gamma Distribution

Definition 1:
1. If w<0 w<0 , then F( w )=0 F( w )=0 and F'( w )=0 F'( w )=0 , a p.d.f. of this form is said to be one of the gamma type, and the random variable W is said to have the gamma distribution.
2. The gamma function is defined by Γ( t )= 0 y t1 e y dy ,0<t. Γ( t )= 0 y t1 e y dy ,0<t.

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

Γ( t )= [ y t1 e y ] 0 + 0 ( t1 ) y t2 e y dy =( t1 ) 0 y t2 e y dy= ( t1 )Γ( t1 ). Γ( t )= [ y t1 e y ] 0 + 0 ( t1 ) y t2 e y dy =( t1 ) 0 y t2 e y dy= ( t1 )Γ( t1 ).

Example 1

Let Γ( 6 )=5Γ( 5 ) Γ( 6 )=5Γ( 5 ) and Γ( 3 )=2Γ( 2 )=( 2 )( 1 )Γ( 1 ) Γ( 3 )=2Γ( 2 )=( 2 )( 1 )Γ( 1 ) . Whenever t=n t=n , a positive integer, we have, be repeated application of Γ( t )=( t1 )Γ( t1 ) Γ( t )=( t1 )Γ( t1 ) , that Γ( n )=( n1 )Γ( n1 )=( n1 )( n2 )...( 2 )( 1 )Γ( 1 ). Γ( n )=( n1 )Γ( n1 )=( n1 )( n2 )...( 2 )( 1 )Γ( 1 ).

However, Γ( 1 )= 0 e y dy=1 . Γ( 1 )= 0 e y dy=1 .

Thus when n is a positive integer, we have that Γ( n )=( n1 )! Γ( n )=( n1 )! ; and, for this reason, the gamma is called the generalized factorial.

Incidentally, Γ( 1 ) Γ( 1 ) corresponds to 0!, and we have noted that Γ( 1 )=1 Γ( 1 )=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( x )= 1 Γ( α ) θ α x α1 e x/θ ,0x<. f( x )= 1 Γ( α ) θ α x α1 e x/θ ,0x<. (1)

Hence, w, the waiting time until the α α th change in a Poisson process, has a gamma distribution with parameters α α and θ=1/λ θ=1/λ .

Function f( x ) f( x ) actually has the properties of a p.d.f., because f( x )0 f( x )0 and

f( x )dx= 0 x α1 e x/θ Γ( α ) θ α dx, f( x )dx= 0 x α1 e x/θ Γ( α ) θ α dx, which, by the change of variables y=x/θ y=x/θ equals

0 ( θy ) α1 e y Γ( α ) θ α θdy= 1 Γ( α ) 0 y α1 e y dy = Γ( α ) Γ( α ) =1. 0 ( θy ) α1 e y Γ( α ) θ α θdy= 1 Γ( α ) 0 y α1 e y dy = Γ( α ) Γ( α ) =1.

The mean and variance are: μ=αθ μ=αθ and σ 2 =α θ 2 σ 2 =α θ 2 .

Figure 1: The p.d.f. and c.d.f. graphs of the Gamma Distribution.
Gamma Distribution
(a) The c.d.f. graph.(b) The p.d.f. graph.
Gamma Distribution (Gamma_pdf_1.gif)Figure 1(b) (Gamma_cdf_1.gif)

Example 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 λ=1/2 λ=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 α=2,θ=1/λ=2. α=2,θ=1/λ=2. Hence,

p( X>5 )= 5 x 21 e x/2 Γ( 2 ) 2 2 dx= 5 x e x/2 4 dx= 1 4 [ ( 2 )x e x/2 4 e x/2 ] 5 = 7 2 e 5/2 =0.287. p( X>5 )= 5 x 21 e x/2 Γ( 2 ) 2 2 dx= 5 x e x/2 4 dx= 1 4 [ ( 2 )x e x/2 4 e x/2 ] 5 = 7 2 e 5/2 =0.287.

We could also have used equation with λ=1/θ λ=1/θ , because α α is an integer P( X>x )= k=0 α1 ( x/θ ) k e x/θ k! . P( X>x )= k=0 α1 ( x/θ ) k e x/θ k! . Thus, with x=5, α α =2, and θ=2 θ=2 , this is equal to

P( X>x )= k=0 21 ( 5/2 ) k e 5/2 k! = e 5/2 ( 1+ 5 2 )=( 7 2 ) e 5/2 . P( X>x )= k=0 21 ( 5/2 ) k e 5/2 k! = e 5/2 ( 1+ 5 2 )=( 7 2 ) e 5/2 .

Chi-Square Distribution

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

Definition 2:
Let X have a gamma distribution with θ=2 θ=2 and α=r/2 α=r/2 , where r is a positive integer. If the p.d.f. of X is
f( x )= 1 Γ( r/2 ) 2 r/2 x r/21 e x/2 ,0x<. f( x )= 1 Γ( r/2 ) 2 r/2 x r/21 e x/2 ,0x<. (2)
We say that X has chi-square distribution with r degrees of freedom, which we abbreviate by saying is χ 2 ( r ) χ 2 ( r ) .

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

μ=αθ=( r 2 )2=r μ=αθ=( r 2 )2=r and σ 2 =α θ 2 =( r 2 ) 2 2 =2r. σ 2 =α θ 2 =( r 2 ) 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.

Figure 2: The p.d.f. of chi-square distribution for degrees of freedom r=2,3,5,8.
 (chi_sq.gif)

Note:

the relationship between the mean μ=r μ=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( x )= 0 x 1 Γ( r/2 ) 2 r/2 w r/21 e w/2 dw . F( x )= 0 x 1 Γ( r/2 ) 2 r/2 w r/21 e w/2 dw . (3)

Example 3

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

P( 1.145X12.83 )=F( 12.83 )F( 1.145 )=0.9750.050=0.925 P( 1.145X12.83 )=F( 12.83 )F( 1.145 )=0.9750.050=0.925

and P( X>15.09 )=1F( 15.09 )=10.99=0.01. P( X>15.09 )=1F( 15.09 )=10.99=0.01.

Example 4

If X is χ 2 ( 7 ) χ 2 ( 7 ) , two constants, a and b, such that P( a<X<b )=0.95 P( a<X<b )=0.95 , 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 α α 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 χ α 2 ( r ) χ α 2 ( r ) is a number such that P[ X χ α 2 ( r ) ]=α P[ X χ α 2 ( r ) ]=α

That is, χ α 2 ( r ) χ α 2 ( r ) is the 100(1- α α ) percentile (or upper 100a percent point) of the chi-square distribution with r degrees of freedom. Then the 100 α α percentile is the number χ 1α 2 ( r ) χ 1α 2 ( r ) such that P[ X χ 1α 2 ( r ) ]=α P[ X χ 1α 2 ( r ) ]=α . This is, the probability to the right of χ 1α 2 ( r ) χ 1α 2 ( r ) is 1- α α . SEE fugure 3.

Example 5

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

Figure 3: χ 0.05 2 ( 7 )=14.07 χ 0.05 2 ( 7 )=14.07 and χ 0.95 2 ( 7 )=2.167. χ 0.95 2 ( 7 )=2.167.
 (chi_2_2.gif)

Content actions

Give Feedback:

E-mail the module author | Rate module ( How does the rating system work?)

Rating system

Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

(0 ratings)

Download:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.

| A lens (?)

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks