21
Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 Uniform distribution - pages 135 – 136 Normal distribution - pages 125 - 131 Gamma distribution - pages 138 - 141

Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Embed Size (px)

Citation preview

Page 1: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Topic 4 - Continuous distributions

• Basics of continuous distributions - pages 119 - 124

• Uniform distribution - pages 135 – 136• Normal distribution - pages 125 - 131 • Gamma distribution - pages 138 - 141

Page 2: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Continuous Random Variables

• A continuous random variable can take on values from an entire interval of the real line.

• The probability density function (pdf) of a continuous random variable, X, is a function f(x) such that for a < b

• The cdf of X is defined as

( ) ( )b

a

P a X b f x dx

( ) ( ) ( )x

F x P X x f t dt

Page 3: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Some relationships

• What is the relationship between f and F?

• P(a ≤ X ≤ b) = F(b) – F(a)

• P(X = a) = P(a ≤ X ≤ a) = F(a) – F(a) = 0

Page 4: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Pipeline example• A pipeline is 100 miles long and every location

along the pipeline is equally likely to break• Let X be the distance measured in miles from

the pipeline origin where a break occurs• What is the cdf for X?

• What is the pdf for X?

• What is P(30 ≤ X ≤ 50)?

Page 5: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Requirements of a pdf

• A pdf must satisfy the following two requirements:

• Does the pipeline pdf satisfy these requirements?

( ) 0 for all

( ) 1

f x x

f x dx

Page 6: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Uniform distribution

• A uniform distribution on the interval from A to B, U(A,B), is defined by a pdf of the form

• Does f(x) meet requirements?

• What is the cdf for the Uniform distribution?

1( ) for f x A x B

B A

Page 7: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Mean and variance of a cont. random variable

2 2

2 2 2

( ( )) ( ) ( ) , expected value of ( )

( ), mean of or expected value of

[( ) ], variance of

( )

( ) ( ), moment generating function for

(0) ,

X

X X

X X

tXX

X X

E h X h x f x dx h X

E X X X

E X X

E X

M t E e X

M

2(0) ( )XM E X

Page 8: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Back to the Uniform

• What is the mean of a U(0,1) distribution?

• What is the variance of U(0,1) distribution?

Page 9: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Gamma distribution• The gamma distribution, is

defined by the following pdf

where

• Properties of the gamma function, – For – If is a positive integer, –

1 /1( ) , 0, 0, 0

( )xf x x e x

1

0

( ) for 0.xx e dx

Page 10: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Properties of the gamma distribution• Is it a valid pdf?

• Show

• Show =

( ) 1 (1 )XM t t

Page 11: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

More on the gamma distribution• is called the shape parameter• is called the scale parameter• The exponential distribution is a special

case of the gamma with • The gamma distribution is used as a

probability model for the time or space before the th event in a Poisson process where events occur at the rate

• Gamma calculator

Page 12: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Back to the clunker car• Recall that my car breaks down once a week

on average. If the breakdowns occur as events in a Poisson process, then what is the probability less than a week passes before my first breakdown? Gamma or Poisson?

• Gamma Calculator

Page 13: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Pipe example• Defects along a piece of pipe occur as events

in a Poisson process with an average of 2 defects every 10 feet. What is the probability that the third defect will occur at least 20 feet from the beginning of the pipe?

• Gamma Calculator

Page 14: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Normal distribution

• The normal distribution, N(2), has a pdf given by

• The normal distribution is always bell shaped.

• The normal distribution is defined in terms of its mean and variance (standard deviation).

• Normal calculator

2

2

( )

21( ) -

2

x

f x e x

Page 15: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Weight gain example• The weight gain associated with an antidepressant is

normally distributed with a mean of 6 lbs and a standard deviation of 3 lbs.

• What is the probability of weight gain?• What is the probability of gaining between 0 and 12 lbs?• Normal Calculator

Page 16: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Standard normal distribution

• If X has a N(2) distribution, then Z=(X-)/ has a standard normal distribution, N(0,1).

• The standard normal is an important reference distribution.

• P(X ≤ x) = P(Z ≤ (x-)/) = (x-)/• The cdf of a standard normal, z), is tabled

in many textbooks• Standardized values, (x-)/indicate how

far in standard deviations the value x is from

• For any normal distribution, probabilities can be phrased in terms of standardized values

Page 17: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Empirical rule• What is the probability

– a normal falls within one standard deviation of the mean?

– a normal falls within two standard deviations of the mean?

– a normal falls within three standard deviations of the mean?

• Normal Calculator

Page 18: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Back to the weight gain example• Recall =6 and =3.• Using the empirical rule, answer the

following questions:– What is the probability of weight loss?

– What is the probability of a weight gain between 0 and 12 pounds?

Page 19: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Normal approximations

• Normal approximation to Binomial

• Normal approximation to Poisson

Page 20: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Do my data look normal?• In StatCrunch, a quantile-quantile plot (QQ

plot) plots ordered data values versus quantiles of a standard normal distribution.

• If the data are from a normal distribution, the points should lie approximately on a straight line.

• Concentration data

Page 21: Topic 4 - Continuous distributions Basics of continuous distributions - pages 119 - 124 119 - 124 Uniform distribution - pages 135 – 136135 – 136 Normal

Other distributions

• The Weibull distribution and the log normal distribution are used to model failure times.

• The beta distribution is used to model proportions.

• There are many other distributions out there.

• Choose the one that serves as the best probability model for your setting.