random variable & discrete distribution
TRANSCRIPT
Random Variable & Discrete Distribution
Random Variable - 1
1
Theoretical Probability Distribution
• Discrete Probability Distributions
• Continuous Probability Distributions
2
Discrete Distributions
• Bernoulli • Binomial • Poisson • Geometric • …
3
Bernoulli Distribution Model (Bernoulli Probability Distribution)
4
Bernoulli Trial
Definition: Bernoulli trial is a random experiment whose outcomes are classified as one of the two categories. (S , F) or (Success, Failure) or (1, 0)
Example:
Tossing a coin, observing Head or Tail
Observing patient’s status Died or Survived.
5
Example: (Tossing a balanced coin)
P(S) = P(X=1) = p = .5
P(F) = P(X=0) = 1 p = .5
Bernoulli Distribution
.5
0 1
Bernoulli Probability Distribution
6
Bernoulli Probability Distribution
Example: In a random experiment of casting a balanced die, we are only interested in observing 6 turns up or not. It is a Bernoulli trail.
P(6) = P(X=1) = p = 1/6
P(6’) = P(X=0) =1 1/6 = 5/6
Bernoulli Distribution
0 1
Random Variable & Discrete Distribution
Random Variable - 2
7
Binomial Distribution Model (Binomial Probability Distribution)
8
Binomial Experiment
A random experiment involving a sequence of independent and identical Bernoulli trials.
Example:
Toss a coin ten times, and observing Head turns up.
Roll a die 3 times, and observing a 6 turns up or not.
In a random sample of 5 from a large population, and observing subjects’ disease status. (Almost binomial)
9
Binomial Probability Model
A model to find the probability of having x number successes in a sequence of n independent and identical Bernoulli trials.
10
Binomial Probability Model
In a binomial experiment involving n independent and identical Bernoulli trials each with probability of success p, the probability of having x successes can be calculated with the binomial probability mass function, and it
is, for x = 0, 1, …, n,
xnx
xnx
ppx
n
ppxnx
nxXP
)1(
)1()!(!
!)(
11
Factorial
n! = 1·2·3·... ·n
0! = 1
Example: 3! = 1·2·3 = 6
Example:
1012123
12345
!2)!25(
!5
2
5
12
Binomial Probability
Example: A balanced die is rolled three times (or three balanced dice are rolled), what is the probability to see two 6’s?
Identify n = 3, p = 1/6, x = 2
xnx ppxnx
nxXP
)1(
)!(!
!)(
(6, 6’, 6’)
(6’, 6’, 6)
(6’, 6, 6’)
069.
6/56/13
)6/5()6/1()!23(!2
!3)2(
12
232
XP
Random Variable & Discrete Distribution
Random Variable - 3
13
Binomial Probability
Example: If 10% of the population in a community have a certain disease, what is the probability that 4 people in a random sample of 5 people from this community has the disease? (Assume binomial experiment.) Identify n = 5, p = .10, x = 4
xnx ppxnx
nxf
)1(
)!(!
!)(
0004.
9.1.5
)10.1()10(.)!45(!4
!5)(
14
454
xf
14
Binomial Probability
Example: In the previous problem, what is the probability that 4 or more people have the disease?
Identify n = 5, p = .10, x = 4
0004.
00046.00001.00045.
)9(.)1(.!0!5
!5)9(.)1(.
!1!4
!5
)5()4()5()4()4(
0514
ffXPXPXP
(What is this number telling us?)
15
Parameters of Binomial Distribution
Parameters of the distribution:
Mean of the distribution, = n·p
Variance of the distribution, 2 = n·p·(1 p)
Standard deviation, , is the square root of
variance.
16
0 1 2 3 4 5
P(0) = .5905
P(1) = .3281
P(2) = .0729
P(3) = .0081
P(4) = .0004
P(5) = .00001
Binomial Distribution
0.590
n = 5, p = .10
= 5 x .10 = .5
2 = 5 x .1 x (1.1) = .45
17
Continuous Distribution
• Normal Distribution
• Exponential Distribution
• …
18
Relative Frequency Histogram
Percent
10 20 30 40 50 60 70 80 90 100 110
Test scores
Random Variable & Discrete Distribution
Random Variable - 4
19
Density Curve
Density
function, f (x)
A smooth curve that fit
the distribution
Percent
Use a mathematical model to describe the variable.
10 20 30 40 50 60 70 80 90 100 110
Test scores
20
Continuous Random Variable
Probability Is Area
Under Curve!
f(x)
X c d
P c X d f x dx c
d ( ) ( )
21
Uniform Skewed to right Symmetrical Skewed to left
22
Normal Distribution 1. ‘Bell-Shaped’ &
Symmetrical
X
f(X)
Mean
Median
Mode
2. Mean, Median, Mode Are Equal
3. Random Variable Has Infinite Range
< x <
23
Normal Probability Density Function
2
2
1
e2
1)(
x
xf
f (x ) = Density of Random Variable x = Mean of the Distribution = Standard Deviation of the Distribution = 3.14159…; e = 2.71828… x = Value of Random Variable ( < x < )
Notation: N , A normal distribution with
mean and standard deviation
24
Effect of Varying Parameters ( & )
X
f(X)
A C
B
Random Variable & Discrete Distribution
Random Variable - 5
25
Normal Distribution Probability
dxxfdxcPd
c )()(
c dx
f(x)
Probability is
area under
curve!
26
Standard Normal Distribution
Standard Normal Distribution:
A normal distribution with mean = 0 and standard deviation = 1.
Notation:
Z ~ N ( = 0, = 1)
0 Z
= 1
Cap letter Z
27
Area under Standard Normal Curve
How to find the proportion of the are under the standard normal curve below z or say P ( Z < z ) = ?
Use Standard Normal Table!!!
0 z
Z
28
P (1 < Z < 3)
P (Z > 3)
1 0 3 Z
0 3 Z
29
Standard Normal Distribution
P(Z > 0.32) = Area above .32 = .374
0 .32
Z .00 .01 .02
0.0 .500 .496 .492
0.1 .460 .456 .452
0.2 .421 .417 .413
0.3 .382 .378 .374
Areas in the upper tail of the standard normal distribution
30
Random Variable & Discrete Distribution
Random Variable - 6
31
Standard Normal Distribution
P(0 < Z < 0.32) = Area between 0 and .32 = .126
0
Area = .5 - .374 = .126
.32
Z .00 .01 .02
0.0 .500 .496 .492
0.1 .460 .456 .452
0.2 .421 .417 .413
0.3 .382 .378 .374
Areas in the upper tail of the standard normal distribution
32
Standard Normal Distribution
P(Z< 0.32) = Area below .32 = .626
0
Area = 1 - .374 = .626
.32
Z .00 .01 .02
0.0 .500 .496 .492
0.1 .460 .456 .452
0.2 .421 .417 .413
0.3 .382 .378 .374
Areas in the upper tail of the standard normal distribution
33
-1.00 0 1.00
P ( -1.00 < Z < 1.00 ) = _____
.341 .341
.682
34
-2.00 0 2.00
P ( -2.00 < Z < 2.00 ) = _____
35
-3.00 0 3.00
P ( -3.00 < Z < 3.00 ) = _____
36
- 1.40 0 2.33
P ( -1.40 < Z < 2.33 ) = ____
.490 .419
.909
Random Variable & Discrete Distribution
Random Variable - 7
37
Standardize the Normal Distribution
X
Normal
Distribution
ZX
One table!
= 0
= 1
Z
Standardized
Normal Distribution
38
N ( 0 , 1)
0
bZ
aPbXaP )(
Standardize the Normal Distribution
a b
N ( , )
Normal
Distribution
X
Standard
Normal
Distribution
Z
a
b
39
Normal Distribution Example
X= 5
= 10
6.2
Normal
Distribution
For a normal distribution that has
a mean = 5 and s.d. = 10, what
percentage of the distribution is
between 5 and 6.2?
40
Standardizing Example
X= 5
= 10
6.2
Normal
Distribution
12.10
52.6
XZ
Z= 0
= 1
.12
Standardized
Normal Distribution P(5 X 6.2
P(0 Z .12
41
Z= 0
= 1
.12
Z .00 .01 .02
0.0 .500 .496 .492
0.1 .460 .456 .452
0.2 .421 .417 .413
0.3 .382 .378 .3745
Obtaining the Probability
.452
Standardized Normal
Probability Table (Portion)
Area = .5 - .452 = .048 42
Example P(2.9 X 7.1)
5
= 10
2.9 7.1 X
Normal
Distribution
0
= 1
-.21 Z.21
Standardized
Normal Distribution
.166
Area = .083 + .083 = .166
P(2.9 X 7.1) =P.21 Z .21
21.10
51.7
21.10
59.2
XZ
XZ
Random Variable & Discrete Distribution
Random Variable - 8
43
Example P(X > 8)
X = 5
= 10
8
Normal
Distribution
Standardized
Normal Distribution
30.10
58
XZ
Z = 0
= 1
.30
.382
Area = .382
P(X > 8) =P(Z > .30
44
Example P(X > 8)
X = 5
= 10
8
Normal
Distribution
62% 38%
Value 8 is the 62nd percentile
45
More on Normal Distribution
The work hours per week for residents in
Ohio has a normal distribution with =
42 hours & = 9 hours. Find the
percentage of Ohio residents whose work
hours are
A. between 42 & 60 hours.
P(42 X 60) =?
B. less than 20 hours.
P(X 20) = ?
46
P(42 X 60) = ?
Normal
Distribution
29
4260
XZ
Standardized
Normal Distribution
09
4242
XZ
X
= 200
2400 Z 0
= 1
2.0
9
42 60 2
P(42 Z 60
P0 Z 2
.477 47.7% .477
47
P(X 20) = ?
Normal
Distribution
Standardized
Normal Distribution
44.29
4220
XZ
X
= 200
2400 Z 0
= 1
2.0
9
20 42 -2.44
P(X 20) = P(Z 2.44
= 0.007 = 0.7%
0.007
48
Finding Z Values for Known Probabilities
Standardized Normal
Probability Table (Portion) What is z given
P(Z < z) = .80 ?
Z … .04 .05
…
.264 .261 .258
0.7 .233 .230 .227
0.8 .203 .200 .198
0.9 .176 .174 .171
0
.80 .20
z
Upper Tail Area = 1 - .80
= .20
z = .84
= .84
Random Variable & Discrete Distribution
Random Variable - 9
49
Finding X Values for Known Probabilities
Example: The weight of new born
infants is normally distributed with a
mean 7 lb and standard deviation of
1.2 lb. Find the 80th percentile.
Area to the left of 80th percentile in 0.200.
In the table there is a area value 0.200
corresponding to a z-score of .84.
80th percentile = 7 + .84 x 1.2 = 8.008 lb
50
Finding X Values for Known Probabilities
Example: The Body Mass Index for a
particular population is normally
distributed with a mean 22 and
standard deviation of 4. Find the 80th
percentile.
Area to the left of 80th percentile in 0.200.
In the table there is a area value 0.200
corresponding to a z-score of .84.
80th percentile = 22 + .84 x 4 = 25.36