Continuous Distributions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Continuous distributions

Five important continuous distributions:

1. uniform distribution (contiuous)

2. Normal distribution
3. χ2 –distribution [“ki-square”]
4. t-distribution
5. F-distribution

1 lecture 5
A reminder

Definition:
Let X: S → R be a continuous random variable.

A density function for X, f (x), is defined by:

1. f (x) ≥ 0 for all x f (x) P(a<X<b)


2. ∫ f ( x) dx = 1
−∞ b
3. P (a < X < b) = ∫ f ( x) dx
a a b x

2 lecture 5
Uniform distribution
Definition

Definition:
Let X be a random variable. If the f (x)
density function is given by 1
1 B− A
f ( x) = A≤ x≤ B
B− A x
A B
then the distribution of X is the
(continuous) uniform distribution on
the interval [A,B].

3 lecture 5
Uniform distribution
Mean & variance

Theorem:
Let X be uniformly distributed on the interval [A,B].
Then we have:
A+ B
• mean of X: E( X ) =
2

( B − A) 2
• variance of X: Var ( X ) =
12

4 lecture 5
Normal distribution
Definition
Definition:
Let X be a continuous random variable.
If the density function is given by
1 −
1
( x − µ )2

f ( x) = 2σ
−∞ < x < ∞
2
e
2πσ 2

then the distribution of X is called the normal distribution


with parameters µ and σ (known).
2

My notation: X ~ N (µ ,σ 2 )
The book’s: n( x; µ , σ ) for density function
5 lecture 5
Normal distribution
Examples
The normal distribution is without doubt the most important
continuous distribution, since many phenomena are well
described by it.

IQ among AAU students Height among AAU students


0.04 0.08

0.03 0.06

0.02 0.04

0.01 0.02

0 0
90 100 110 120 130 140 150 160 170 180 190 200

Plotting in Matlab:
>> x=90:1:150; y=normpdf(x,120,10); plot(x,y)
µ σ
6 lecture 5
Normal distribution
Mean & variance
Theorem:
If X ~ N(µ,σ2) then
• mean of X: E( X ) = µ
• variance of X: Var ( X ) = σ 2

Density function: 0.4

0.3
N(0,1)
0.2
N(1,1)
0.1 N(0,2)
0.0

7 -4 -2 0 2 4 lecture 5

x
Normal distribution
Standard normal distribution
Standard normal distribution: Z ~ N(0,1)
Density function: Distribution function:
z 1
1 1 − 2 z2

1 − z2
f ( z) = e 2 F ( z ) = P( Z ≤ z ) = e dx
2π −∞ 2π
0.4

0.3
(see Table A.3)
0.2

0.1
Notice!! Due to symmetry
0.0
P(Z ≤ −z) = 1− P(Z ≤ z)
-3 -2 -1 0 1 2 3
2 1
1 − 2 z2
P (−1 ≤ Z ≤ 2) = ∫
−1 2π
e dz
8 lecture 5
Normal distribution
Standard normal distribution

Standard normal distribution, N(0,1), is the only normal


distribution for which the distribution function is tabulated.

We typically have X~N(µ,σ2) where µ ≠ 0 and σ2 ≠ 1.

Example: X ~ N(1,4) 0.4

0.3

What is P( X > 3 ) ? 0.2

0.1

0.0

-2 0 2 4

9 lecture 5
Normal distribution
Standard normal distribution
Theorem: Standardise
X −µ
If X ~ N(µ,σ2) then ~ N (0 ,1)
σ
Example cont.: X ~ N(1,4). What is P(X >3) ?
X −1 3 −1
P( X > 3) = P( > ) = P( Z > 1) = 1 − P( Z ≤ 1) = 0.1587
2 2
0.4 0.4
Z ~ N(0,1)
Z ~ N(0,1)
0.3
X ~ N(1,4) 0.3

0.2 0.2
Equal areas = 0.1587
0.1 0.1

0.0 0.0

-2 0 2 4 -2 0 2 4

10 lecture 5
Normal distribution
Standard normal distribution
0.4

0.3

0.2

0.1

0.0

-2 0 2 4

P( Z ≤ 1) = 0.8413 ⇒ P( X > 3) = 1 − P ( Z ≤ 1) = 1 − 0.8413 = 0.1587

11 lecture 5
Normal distribution
Standard normal distribution
Example cont.: X ~ N(1,4). What is P(X >3) ?
P( X > 3) = 1 − P( X ≤ 3) = 0.1587
Solution in Matlab:
Cumulative distribution function
>> 1 – normcdf(3,1,2)
normcdf(x,µ,σ)
ans =
0.1587

Solution in R:
> 1 - pnorm(3,1,2) Cumulative distribution function
[1] 0.1586553 pnorm(x,µ,σ)

12 lecture 5
Normal distribution
Example
0.010
Problem: 0.008

The lifetime of a light bulb is normal 0.006

distributed with mean 800 hours and 0.004

0.002
standard deviation 40 hours: 0.000

650 700 750 800 850 900 950

1. Find the probability that the lifetime of a bulb is between


750-850 hours.
2. Find the number of hours b, such that the probability of a
bulb having a lifetime longer than b is 90%.
3. Find a time period symmetric around the mean so that the
probability of a lifetime in this interval has probability 95%

13 lecture 5
Normal distribution
Example
Solution in Matlab:
1. P(750 < X < 850) = ?
>> normcdf(850,800,40)-normcdf(750,800,40)
2. ?
3. ...

Solution in R:
1. P(750 < X < 850) = ?
> pnorm(850,800,40)-pnorm(750,800,40)
2. P(X > b) = 0.90 ⇔ P(X ≤ b) = 0.10
> qnorm(0.1,800,40)
3. ...

14 lecture 5
Normal distribution
Relation to the binomial distribution
If X is binomial distributed with parameters n and p,
then
X − np
Z=
np (1 − p )

0
.1
5
is approximately normal distributed.

0
.1
0
0
.0
5
Rule of thumb:
If np>5 and n(1−p)>5, then
0
.0
0
0 5 10 15 20

the approximation is good

15 lecture 5
Normal distribution
Linear combinations
Theorem: linear combinations
If X1, X2,..., Xn are independent random variables, where
X i ~ N ( μi ,σ i2 ), for i = 1,2 , ,n,
and a1,a2,...,an are constant, then the linear combination
Y = a1 X 1 + a2 X 2 +  + an X n ~ N ( µY , σ Y ),
2

where
µY = a1µ1 + a2 µ 2 +  + an µ n
σ Y2 = a12σ 12 + a22σ 22 +  + an2σ n2

16 lecture 5
The χ2 distribution
Definition

Definition: (alternative to Walpole, Myers, Myers & Ye)


If Z1, Z2,..., Zn are independent random variables, where
Zi ~ N(0,1), for i =1,2,…,n,
then the distribution of
n
Y = Z1 + Z 2 +  + Z n = ∑ Z i
2 2 2 2

i =1
2
is the χ -distribution with n degrees of freedom.

Notation: Y ~ χ 2 ( n) Critical values: Table A.5

17 lecture 5
The χ2 distribution
Definition
Definition: A continuous random variable X follows a χ2-
distribution with n degrees of freedom if it has density
function 1 n 2 −1 − x 2
f ( x) = x e for x > 0
2 Γ(n 2)
n2

0.5 Y ~ χ2(1) Antag Y ~ χ2(n)


0.4

0.3 Y ~ χ2 (3) E(Y) =n


0.2 Var(Y) = 2n
0.1
Y ~ χ2 (5)
0.0 E(Y/n) = 1
0 2 4 6 8 10
Var(Y/n) = 2/n

18 lecture 5
t-distribution
Definition

Definition:
2
Let Z ~ N(0,1) and V ~ χ (n) be two independent
random variables. Then the distribution of
Z
T=
V
n
is called the t-distribution with n degrees of freedom.

Notation: T ~ t(n) Critical values: Table A.4

19 lecture 5
t-distribution
Compared to standard normal

0.4
X ~ N(0,1)
0.3

0.2
T ~ T(3)

0.1 T ~ T(1)
0.0

-3 -2 -1 0 1 2 3

•The t-distribution is symmetric around 0


•The t-distribution is more flat than the standard normal
•The more degrees of freedom the more the t-
distribution looks like a standard normal
20 lecture 5
F-distribution
Definition

Definition:
Let U ~ χ (n1) and V ~ χ (n2) be two independent random
2 2

variables. Then the distribution of


U
n1
F=
V
n2
is called the F-distribution with n1 and n2 degrees of
freedom.

Notation: F ~ F(n1 , n2) Critical values: Table A.6

21 lecture 5
F-distribution
Example

F ~ F(20,50)
1.0
0.8 F ~ F(10,30)
0.6
0.4
F ~ F(6,10)
0.2

0.0

0 1 2 3 4

22 lecture 5

You might also like