BIOSTAT Random Variables & Probability Distribution
BIOSTAT Random Variables & Probability Distribution
Probability Distributions
Consider the random experiment of observing
outcomes of a treatment in two patients.
S* = { 0, 1, 1, 2}
Random Variable
• a real-valued function defined over a sample
space
• assigns a real number to every sample point of
the sample space
Types:
– Discrete
– Continuous
Consider S* = { 0, 1, 1, 2}
Frequency Distribution of X
x 0 1 2
Frequency 1 2 1
Probability Distribution of X
x 0 1 2
0.6
0.5
0.4
P[ X = x ]
0.3
0.2
0.1
0
0 1 2
x
Probability Distribution for
Discrete Variables
E[X] = X = x f ( x)
x
Variance of the Random Variable X
SSSS S FFFF
F
x n x
• The probability that such a sample point would
be observed is
ppp p (1 p)(1 p ) (1 p ) p x (1 p ) n x
x n x
Binomial Distribution
• There would be a total of n Cx such sample
points [sample points consisting of exactly x
“successes” out of n trials].
• Thus,
n x
P[ X x] p (1 p ) n x
x
Binomial Distribution
• Let X be the number of successes in n such trials.
Then X is a binomial random variable and it’s density
function is given by
n x n x
x p (1 p ) , x 0,1, 2,..., n
f ( x; n, p) P[ X x]
0 , otherwise
• Notation: X~bin(n,p)
Binomial Distribution
• If X has a binomial distribution, then
E[ X ] np
V [ X ] npq
Example
The probability that a patient recovers from a rare blood
disease is 0.4. Suppose 5 people are known to have
contracted this disease. Let X be the number of persons who
recover from the rare blood disease.
1.Find and completely specify the distribution of X.
2.Find the mean and variance of the number of persons
who recover from the rare blood disease.
Example
3.What is the probability that exactly 5 persons recover
from the rare blood disease?
4.What is the probability that at least 13 persons recover
from the rare blood disease?
5.What is the probability that from 3 to 5 persons
(inclusive) recover from the rare blood disease?
Poisson Distribution
• A random variable X is said to be a Poisson
random variable if its probability mass function
is given by
e x
, x 0,1, 2,...; 0
f ( x; ) P[ X x] x !
0 , otherwise
Poisson Distribution
• If X has a Poisson distribution, then
E[ X ]
V[X ]
Poisson Distribution
• The Poisson distribution provides a realistic
model for many phenomenon that involves
counts. Examples are the number of accidents
occurring for a given time interval, the number of
emergency cases admitted for a given time
period, number of telephone calls entering a
switchboard for a large company. The parameter
is the mean number of occurrences for a given
time interval.
Example
On the average, a certain intersection results in 3 traffic
accidents per month. Let X be the number of traffic
accidents in that intersection.
1.Find and completely specify the distribution of X.
2.What is the probability that in any given month at this
intersection
a) exactly 5 accidents will occur?
b) less than 3 accidents will occur?
c) at least 2 accidents will occur?
Try it now!!!
1.A baseball player’s batting average is 0.25. Suppose it
is of interest to find the probability, that in his next 5 times
at the bat, he gets exactly 1 hit, or more than 3 hits, or at
most 2 hits.
a) Define a discrete random variable. Find and
completely specify its distribution.
b) What is the probability, that in his next 5 times at
the bat, he gets exactly 1 hit?
c) What is the probability, that in his next 5 times at
the bat, more than 3 hits?
d) What is the probability, that in his next 5 times at
the bat, at most 2 hits?
Try it now!!!
2. The average number of days school is closed due to snow
during winter in a certain city in the western part of United
States is 4. Suppose it is of interest to find the probability
that the schools in this city will close for 6 days, more than 2
days, or from 1 to 3 days during a winter.
a) Define a discrete random variable. Find and
completely specify its distribution.
b) What is the probability that the schools in this city
will close for 6 days?
c) What is the probability that the schools in this city
will close for more than 2 days?
d) What is the probability that the schools in this city
will close from 1 to 3 days?
Normal Distribution
μ
Standard Normal Distribution
• a normal random variable with mean 0 and
variance 1
1 2
1 z
f ( z) e2
2
Standard Normal Distribution
• The standard normal distribution is
visualized by the normal curve given
by
0
Standard Normal Distribution
NOTE:
• areas under the normal curve correspond
to probabilities
• areas under the standard normal curve
are summarized in the normal
distribution table or z –table
Standard Normal Distribution
Examples: If Z ~ N(0,1), find
1.P[Z > 1.24]
2.P[Z < -2.37]
3.P[-2.37 < Z < 1.24]
4.a such that P[Z < a] = 0.9147
5.b such that P[Z > b] = 0.0526
Standard Normal Distribution
NOTE:
• a normal random variable X with mean
and variance 2 can be transformed
to a standard normal random variable z
by
x
z
Applications
The distribution of IQs of applicants to a
certain university is normally distributed
with a mean of 115 and a standard
deviation of 12.
1. What percentage of the applicants has an
IQ between 103 and 127?
2. Suppose the university accepts only
applicants whose IQ belongs to the top
2.5%. What is the lowest IQ of the
applicant who gets accepted to the
university?
Try it now!!!
A lawyer commutes daily from his suburban
home to his midtown office. On the average, the
trip takes 24 minutes with a standard deviation of
3.8 minutes. Assume the distribution of trip times
to be normally distributed.