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

Probability Distribution

Glyzel Grace M. Francisco


STAT 2205 – Introduction to Biostatistics
2nd Semester, 2020-2021

CENTRAL LUZON STATE UNIVERSITY


DEPARTMENT of
STATISTICS Random Variable

variable that has a single numerical value (determined


by chance) for each outcome of a random experiment

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 2


DEPARTMENT of
STATISTICS Random Variable

Discrete Random Variable


-has finite or countable number of values

Continuous Random Variable


-has infinitely many values
-can take on values without gaps or interruptions

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 3


DEPARTMENT of
STATISTICS Random Variable
Random Experiment (r.e.) – tossing two coins

S = {HH, HT, TH, TT}


n(S) = 4
Let X – number of heads
Sample Space HH HT TH TT
X 2 1 1 0

x = {0, 1, 2}
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 4
DEPARTMENT of
STATISTICS Random Variable example

• number of students present


• height of students in class
• number of red marbles in a jar
• number of heads when flipping three coins
• time between customer arrivals in a restaurant
• distance travelled between classes
• the number of employees scolded by the manager

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 5


DEPARTMENT of
STATISTICS Probability Distribution

listing of distinct outcomes of a random


variable along with its associated probabilities

can be expressed in the form of:


• formula
• table
• graph

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 6


DEPARTMENT of
STATISTICS Probability Distribution
r.e. – tossing two coins
Let x – number of heads Sample Space HH HT TH TT
x = {0, 1, 2} X-number of heads 2 1 1 0

X=x P(X=x)=f(x)
0 P(X=0) = f(0) = 1/4
x = {0, 1, 2} probability
1 P(X=1) = f(1) = 2/4
2 P(X=2) = f(2) = 1/4

The whole table is an example of probability distribution


(rows and columns may interchange)
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 7
DEPARTMENT of
STATISTICS Probability Distribution
r.e. – tossing two coins
Let x – number of heads
x = {0, 1, 2}
Sample Space HH HT TH TT
X-number of heads 2 1 1 0

1
, 𝑥 = 0,2
𝑃 𝑋=𝑥 =𝑓 𝑥 = 4
2 PROBABILITY
,𝑥 = 1 DISTRIBUTION
4
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 8
DEPARTMENT of
STATISTICS Probability Distribution

Requirements of a Probability Distribution

1. 0 ≤ 𝑓 x ≤ 1 or 0 ≤ 𝑃 𝑋 = 𝑥 ≤ 1
- the probability for every x should be from 0 to 1

2. σ 𝑓 𝑥 = 1 Where x assumes all the possible values


- the sum of all the probabilities of x should be equal to 1 or 100%

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 9


DEPARTMENT of
STATISTICS Probability Distribution
Identify whether it is a probability distribution or not.
Note: See slide 9 for the requirements of a Probability Distribution
1. X P(X=x)
Yes, it is a probability
5 10% distribution since σ 𝑓 𝑥 = 1
10 15% or 100%
15 75%
3(0) + 2 2
= ,𝑥 = 0
3𝑥 + 2 𝑃 𝑋=𝑥 =𝑓 𝑥 = 3 3
2. 𝑓 𝑥 = , 𝑥 = 0,1 3(1) + 2 5
= ,𝑥 = 1
3 3 3
Subtitute the No, it is not a probability distribution since the probability when x=1 is 5/4
value of x
which is greater than 1 and the σ 𝑓 𝑥 ≠ 1 or 100%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 10
DEPARTMENT of
STATISTICS Mean of a Random Variable
• Expected value of X
• represents the average value of the outcomes

𝜇𝑥 = 𝐸 𝑋 = ෍[𝑥 ∙ 𝑓 𝑥 ]

Properties:
• 𝐸 𝑐 =𝑐
• 𝐸 𝑐𝑋 = 𝑐𝐸[𝑋] Note: c is any constant
number
• 𝐸[𝑋 ± 𝑌] = 𝐸[𝑋] ± 𝐸[𝑌]
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 11
DEPARTMENT of
STATISTICS Mean of a Random Variable
r.e. – tossing two coins X=x P(X=x)=f(x)
Let x – number of heads 0 P(X=0)=f(0)=1/4
x = {0, 1, 2} 1 P(X=1)=f(1)=2/4
2 P(X=2)=f(2)=1/4
Find the expected value of the number of heads

𝜇𝑥 = 𝐸 𝑋 = ෍[𝑥 ∙ 𝑓 𝑥 ]

𝐸 𝑋 = 𝑥1 ∙ 𝑓 0 + 𝑥2 ∙ 𝑓 1 + 𝑥3 ∙ 𝑓 2
1 2 1
= 0∙4 + 1∙4 + 2∙4
2 2 Hence, the expected value of the number
𝐸 𝑋 =0+ + =𝟏 of heads is 1
4 4
Note: expected value can be more or less than 1 STAT2205 - INTRODUCTION TO BIOSTATISTICS | 12
DEPARTMENT of
STATISTICS Variance of a Random Variable

𝜎𝑥2 = 𝑉 𝑋

= 𝐸 𝑋2 − 𝐸 𝑋 2

where

𝐸 𝑋 2 = σ[𝑋 2 ∙ 𝑓(𝑥)]

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 13


DEPARTMENT of
STATISTICS Variance of a Random Variable
r.e. – tossing two coins X=x P(X=x)=f(x)
Let x – number of heads 0 P(X=0)=f(0)=1/4
x = {0, 1, 2} 1 P(X=1)=f(1)=2/4
Find the variance of the number of heads 2 P(X=2)=f(2)=1/4
𝜎𝑥2 = 𝑉 𝑋 = 𝐸 𝑋 2 − 𝐸 𝑋 2

Find the 𝐸 𝑋 2 first


𝐸 𝑋 2 = ෍[𝑋 2 ∙ 𝑓(𝑥)] = 𝑥12 ∙ 𝑓 0 + 𝑥22 ∙ 𝑓 1 + 𝑥32 ∙ 𝑓 2

1 2 1 2 4 𝟔
𝐸 𝑋2 = 02 2 2
∙ + 1 ∙ + 2 ∙ = 0 + + = = 𝟏. 𝟓
4 4 4 4 4 𝟒
Hence, the variance of the
𝜎𝑥2 = 𝑉 𝑋 = 𝐸 𝑋 2 − 𝐸 𝑋 2 = 1.5 − 1 = 𝟎. 𝟓 number of heads is 0.5
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 14
DEPARTMENT of
STATISTICS

Values
Example
Symbol Definition Definition X=1, 2, 3, 4, 5
X=1, 2, 3, 4, 5

• greater than • X is greater than 3


> X>3 3, 4
• more than • X is more than 3
< • less than X<3 • X is less than 3 1, 2
• greater than or equal to • X is greater than or equal to 3
≥ X≥3 3, 4, 5
• at least • X is at least 3
• less than or equal to • X is less than or equal to 3
≤ X≤3 1, 2, 3
• at most • X is at most 3
= • equal X=3 • X is equal to 3 3
≠ • not equal X≠3 • X is not equal to 3 1, 2, 4, 5

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 15


DEPARTMENT of
STATISTICS Cumulative Probability
• measures the probability of more than one event
X=x P(X=x)=f(x)
0 P(X=0)=f(0)=1/4
1 P(X=1)=f(1)=2/4
2 P(X=2)=f(2)=1/4

a) Find the probability of obtaining at least 1 head.

b) Find the probability of obtaining at most 2 heads.

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 16


DEPARTMENT of
STATISTICS Cumulative Probability
r.e. – tossing two coins X=x P(X=x)=f(x)
Let x – number of heads 0 P(X=0)=f(0)=1/4
x = {0, 1, 2} 1 P(X=1)=f(1)=2/4
2 P(X=2)=f(2)=1/4
a) Find the probability of obtaining at least 1 head.

𝑃 𝑥 ≥1 =𝑃 𝑥 =1 +𝑃 𝑥 =2
=𝑓 1 +𝑓 2
2 1 3
𝑃 𝑥 ≥ 1 = + = = 𝟎. 𝟕𝟓 𝐨𝐫 𝟕𝟓%
4 4 4
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 17
DEPARTMENT of
STATISTICS Cumulative Probability
r.e. – tossing two coins X=x P(X=x)=f(x)
Let x – number of heads 0 P(X=0)=f(0)=1/4
x = {0, 1, 2} 1 P(X=1)=f(1)=2/4
2 P(X=2)=f(2)=1/4
b) Find the probability of obtaining at most 2 heads.

𝑃 𝑥 ≤2 =𝑃 𝑥 =0 +𝑃 𝑥 =1 +𝑃 𝑥 =2
=𝑓 0 +𝑓 1 +𝑓 2
1 2 1 4
𝑃 𝑥 ≤ 2 = + + = = 𝟏 𝐨𝐫 𝟏𝟎𝟎%
4 4 4 4
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 18
DEPARTMENT of
STATISTICS Probability Distribution

Dan Woodward is the owner and manager of Dan’s


Truck Stop. Dan offers free refills on all coffee orders.
He gathered the following information on the
number of refills.

Number of Refill X 0 1 2 3
Probability P(X) 30% 40% 20% 10%

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 19


DEPARTMENT of
STATISTICS Probability Distribution
Number of Refill - 𝒙 0 1 2 3
Probability - f(𝒙) 30% 40% 20% 10%
Get the product of 𝒙 ∙ 𝑓(𝑥) 0 0.40 0.40 0.30
What is the probability that there will be at least two refills?
𝑃 𝑋 ≥ 2 = 𝑃 𝑋 = 2 + 𝑃(𝑋 = 3)
= 0.20 + 0.10 = 𝟎. 𝟑𝟎
What is the expected number of refills?
𝜇𝑥 = 𝐸 𝑋 = ෍[𝑥 ∙ 𝑓 𝑥 ] = 𝑓 0 + 𝑓 1 + 𝑓 2 + 𝑓(3)

𝐸 𝑋 = 0 + 0.40 + 0.40 + 0.30 = 𝟏. 𝟏𝟎


STAT2205 - INTRODUCTION TO BIOSTATISTICS | 20
DEPARTMENT of
STATISTICS Probability Distribution
Number of Refill - 𝒙 0 1 2 3
Probability - f(𝒙) 30% 40% 20% 10%
Get the product of 𝒙 ∙ 𝑓(𝑥) 0 0.40 0.40 0.30
Compute the a) variance and b) standard deviation of the
number of coffee refills.
a) 𝑉 𝑋 = 𝜎 𝟐 = σ 𝑥 2 ∙ 𝑓 𝑥 − 𝐸[𝑥])2
= 2.1 − (1.1)2 = 𝟎. 𝟖𝟗

b) 𝜎 = 0.89=0.94

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 21


DEPARTMENT of
STATISTICS Probability Distribution

Probability
Distribution

Discrete Continuous
Probability Probability
Distribution Distribution

Uniform Binomial Poisson Normal


Distribution Distribution Distribution Distribution

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 22


DEPARTMENT of
STATISTICS Discrete Probability Distribution

1. Uniform

2. Binomial

3. Poisson

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 23


DEPARTMENT of
STATISTICS Uniform Distribution

• simplest of all the discrete probability distributions

• rectangular distribution

• random variable X assumes all its values with


equal probabilities

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 24


DEPARTMENT of
STATISTICS Uniform Distribution

1
𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝑈 𝑥; 𝑁 =
𝑁
𝑁+1
E[𝑋] =
2

𝑁2 − 1
V[𝑋] =
12

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 25


DEPARTMENT of
STATISTICS Uniform Distribution: Illustration

Determine the probability distribution (using table and


formula) of the number of dots when rolling a die.
x f(x)
1 1 1/6
𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝑈 𝑥; 𝑁 = 2 1/6
𝑁
3 1/6
1 4 1/6
𝑓 𝑥 = 𝑈 𝑥; 6 = , 𝑥 = 1,2,3,4,5,6
6 5 1/6
6 1/6
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 26
DEPARTMENT of
STATISTICS Uniform Distribution: Illustration
What is the probability of drawing a number 10
or less from a ball with numbers from 1 to 50?
1
𝑓 𝑥 = 𝑈 𝑥; 50 = , 𝑥 = 1,2, … , 50
50

𝑃 𝑥 ≤ 10 = 𝑓 1 + 𝑓 2 + 𝑓 3 + 𝑓 4 + 𝑓 5 +
𝟏𝟎
𝑓 6 + 𝑓 7 + 𝑓 8 + 𝑓 9 + 𝑓 10 = 𝟓𝟎 = 𝟎. 𝟐𝟎

the probability or chance of drawing a number 10


or less from a ball with numbers from 1 to 50 is 0.20 or 20%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 27
DEPARTMENT of
STATISTICS Binomial Distribution

Properties of a Binomial Distribution:


a) The experiment consist of n repeated trials
b) Each trial results in an outcome that may be
classified as a success and a failure
c) The probability of success, denoted by p, remains
constant from trial to trial
d) The repeated trials are independent

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 28


DEPARTMENT of
STATISTICS Binomial Distribution

𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝐵 𝑥; 𝑛, 𝑝
𝑛 𝑥 𝑛−𝑥
= ∙𝑝 ∙𝑞
𝑥
=.𝑛 𝐶𝑥 ∙ 𝑝 𝑥 ∙ 𝑞𝑛−𝑥

𝑤ℎ𝑒𝑟𝑒: 𝑥 = 0,1, … , 𝑛
𝑞 =1−𝑝

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 29


DEPARTMENT of
STATISTICS Binomial Distribution: Mean and Variance

𝐸 𝑋 = 𝑛𝑝

𝑉 𝑋 = 𝑛𝑝𝑞

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 30


DEPARTMENT of
STATISTICS Binomial Distribution: Illustration
In a family having 3 children, what is the probability that 2
are female?
n=3
x - number of female
p = 0.50 (probability of x or the probability that a child is female)
𝑥 𝑛−𝑥
𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝐵 𝑥; 𝑛, 𝑝 =.𝑛 𝐶𝑥 ∙ 𝑝 ∙ 𝑞
𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝐵 𝑥; 3,0.50 =.3 𝐶𝑥 ∙ 0.50𝑥 ∙ 0.503−𝑥
𝑓 𝑥 =.3 𝐶2 ∙ 0.502 ∙ 0.503−2
In a family having 3 children,
𝟑 what is the probability that 2
𝒇 𝟐 = = 𝟎. 𝟑𝟕𝟓
𝟖 are female is 0.375 or 37.5%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 31
DEPARTMENT of
STATISTICS Binomial Distribution: Illustration
A student randomly guesses at 5 multiple-choice questions
has four possible choices. Show the probability distribution
of the number of correct answers.

Find the probability that:


a) the student gets exactly 3 correct answers
b) the student gets at least 2 correct answers
c) the student gets 5 incorrect answers

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 32


DEPARTMENT of
STATISTICS Binomial Distribution: Illustration
A student randomly guesses at 5 multiple-choice questions
has four possible choices. Show the probability distribution of
the number of correct answers.
n = 5 (number of trials, or number of questions)
x - number of correct answers
x= {0,1,2,3,4,5} (from zero to perfect score)
p = 0.25 (probability of getting the correct answer in one trial)
𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝐵 𝑥; 5,0.25
𝑥 5−𝑥
=.5 𝐶𝑥 ∙ 0.25 ∙ 0.75 Probability of NOT getting
the correct answer
Probability of getting
the correct answer STAT2205 - INTRODUCTION TO BIOSTATISTICS | 33
DEPARTMENT of
STATISTICS Binomial Distribution: Illustration
𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝐵 𝑥; 5,0.25 =.5 𝐶𝑥 ∙ 0.25𝑥 ∙ 0.755−𝑥
𝑃 𝑋 =0 =𝑓 0 = 𝐵 0; 5,0.25 =.5 𝐶0 ∙ 0.250 ∙ 0.755−0 = 0.2373
𝑃 𝑋 =1 =𝑓 1 = 𝐵 1; 5,0.25 =.5 𝐶1 ∙ 0.251 ∙ 0.755−1 = 0.3955
𝑃 𝑋 =2 = 𝑓 2 = 𝐵 2; 5,0.25 =.5 𝐶2 ∙ 0.252 ∙ 0.755−2 = 0.2637
𝑃 𝑋 =3 = 𝑓 3 = 𝐵 3; 5,0.25 =.5 𝐶3 ∙ 0.253 ∙ 0.755−3 = 0.0879
𝑃 𝑋 =4 = 𝑓 4 = 𝐵 4; 5,0.25 =.5 𝐶4 ∙ 0.254 ∙ 0.755−4 = 0.0146
𝑃 𝑋 =5 = 𝑓 5 = 𝐵 5; 5,0.25 =.5 𝐶5 ∙ 0.255 ∙ 0.755−5 = 0.0010
X=x 0 1 2 3 4 5
P(X=x) or f(x) 0.2373 0.3955 0.2637 0.0879 0.0146 0.0010

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 34


DEPARTMENT of
STATISTICS Binomial Distribution: Illustration
Find the probability that:
a) the student gets exactly 3 correct answers
n=5
x - number of correct answers
x={3}
p = 0.25
𝑃 𝑋 = 3 = 𝑓 3 = 𝐵 3; 5,0.25
=.5 𝐶3 ∙ 0.253 ∙ 0.755−3
𝑃 𝑋 = 3 = 𝟎. 𝟎𝟖𝟕𝟗 the probability that the student
gets exactly 3 correct answers is
0.0879 or 8.79%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 35
DEPARTMENT of
STATISTICS Binomial Distribution: Illustration
Find the probability that:
b) the student gets at least 3 correct answers
n=5
x - number of correct answers
X={3,4,5}
p = 0.25
𝑃 𝑋 ≥2 =𝑃 𝑥 =3 +𝑃 𝑥 =4 +𝑃 𝑥 =5
= 0.0879 + 0.0146 + 0.0010
𝑃 𝑋 ≥ 2 = 𝟎. 𝟏𝟎𝟑𝟓 the probability that the student gets
at least 3 correct answers is 0.1035
or 10.35%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 36
DEPARTMENT of
STATISTICS Binomial Distribution: Illustration
Find the probability that:
c) the student gets 5 incorrect answers
n=5
x - number of correct answers
X={0}
p = 0.25
𝑃 𝑋 = 0 = 𝑓 0 = 𝐵 0; 5,0.25
0 5−0
=.5 𝐶0 ∙ 0.25 ∙ 0.75
the probability that the student gets
𝑃 𝑋 = 0 = 𝟎. 𝟐𝟑𝟕𝟑 5 incorrect answers is 0.2373 or
23.73%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 37
DEPARTMENT of
STATISTICS Poisson Distribution

• models the number of occurrences per unit time or


space

Conditions:
• rate of occurrence is constant & known over
time/space
• independent occurrences
• simultaneous occurrences are nearly impossible (rare)

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 38


DEPARTMENT of
STATISTICS Poisson Distribution

−𝝀 𝑥
𝑒 𝝀
𝑃 𝑋 = 𝑥 = 𝑓 𝑥 = 𝑃 𝑥; 𝝀 =
𝑥!

𝑤ℎ𝑒𝑟𝑒: 𝝀 = 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑛𝑜. 𝑜𝑓 𝑜𝑐𝑐𝑢𝑟𝑒𝑛𝑐𝑒𝑠 𝑖𝑛 𝑎


𝑔𝑖𝑣𝑒𝑛 𝑡𝑖𝑚𝑒 𝑜𝑟 𝑠𝑝𝑎𝑐𝑒
𝑒 = 2.71828 …
𝑥 = 0,1, …
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 39
DEPARTMENT of
STATISTICS Poisson Distribution: Mean and Variance

𝐸 𝑋 =𝝀

𝑉 𝑋 =𝝀

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 40


DEPARTMENT of
STATISTICS Poisson Distribution: Illustration

The average number of days school is closed due to


snow during the winter in a certain city in the eastern
part of United States is 4. What is the probability that
the schools in the city will be close for

a) 6 days?

b) a day during the winter?

STAT2205 - INTRODUCTION TO BIOSTATISTICS | 41


DEPARTMENT of
STATISTICS Poisson Distribution: Illustration
𝝀 = 𝑚𝑒𝑎𝑛 , 𝝀=4
What is the probability that the schools in the city will be close for

a) 6 days?
𝑒 −𝝀 𝝀𝑥 𝑒 −4 46
𝑃 𝑋 = 6 = 𝑓 6 = 𝑃 𝑥 = 6; 𝝀 = 𝟒 = 𝑥! = 6! = 𝟎. 𝟏𝟎𝟒𝟐
the probability that the schools in the city will be close for 6 days is 0.1042 or 10.42%
b) a day during the winter?
𝑒 −𝝀 𝝀𝑥 𝑒 −4 41
𝑃 𝑋 = 1 = 𝑓 1 = 𝑃 𝑥 = 1; 𝝀 = 𝟒 = 𝑥! = 1! = 𝟎. 𝟎𝟕𝟑𝟑
the probability that the schools in the city will be close for at least a day during the
winter is 0.0733 or 7.33%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 42
DEPARTMENT of
STATISTICS Poisson Distribution: Illustration

For a recent period of 100 years, there were 93 major


earthquakes in the world. Find the probability that the
number of earthquakes in a randomly selected year is 0?
93
𝝀= = 0.93
100
𝑃 𝑋 = 0 = 𝑓 0 = 𝑃 𝑥 = 0; 𝜆 = 0.93
𝑒 −𝝀 𝝀𝑥 𝑒 −0.93 0.930 the probability that the
= = number of earthquakes in a
𝑥! 0!
𝑃 𝑋 = 0 = 𝟎. 𝟑𝟗𝟒𝟔 randomly selected year is 0 is
0.3946 or 39.46%
STAT2205 - INTRODUCTION TO BIOSTATISTICS | 43

You might also like