Professional Documents
Culture Documents
LA
Second class
RANDOM VARIÁBLES ÄND
THEIR DISTRIBUTIONS
randomexperimeat is
S (HHHHHT.HTH,THHHTT,THT,,TTH,TIT}
If one concermed only with the aumber of heads that fall, then a
numerical value of 0, , 2, or 3 is assigned to each element of
. . *: .
-34
.
gven experinent.
1-DiscreteRandom variables:
are those that take on a finite or denumerably infinite
nunber of distinct values (say x,X2,X)forexample
()The daily demand for a specific newspaper.
(ü) The number of customers amiving at a counter per hour.
Example I. 23
-35
**
X=i+j; i,j =1,2.,6
diierence between the upturne
let Y denote the absolute
**
Also
faces, then
Y=li-j; i,j=12,,6
0,1.2.5.
Probability function
takes on any gven one of its
When a discrete r.v. X
finite, or deaumerable vaues, say x,.X,*.. then
possible
the function P{x} defined by
P(X=x) if x=x
P(x)-
ifX#K,
) Px)=
-36
Axample I. 24
Solution ' * * * * * * * * * *
*
0 2 3
Py) 6/36 10/36 8/36 6/364/36 2/36
by similar way one can obtain the p. fn of r.v. X.
Distribution functions
Given a r. v. X, the distribution ( abberviated by d. fn) of
X, F(x), is defined by
F(x)= P(XSx).
LEX is continuous r. v,. then
F(X)= f(x)dr
F(x)= Pa)
-37
tems of its coresponding r.v, in particular, we have for a
any.
a,bfasb).
P(a<Xsb)= P(X Sb) - P(Xsa)
=F(b)-F(a)
We note that 0sF(x)SI for all x.
Example25
n Ex (. 23) find the distribution functioem and the graph
öfitalso the graph of probability fn.
Solution
In Ex (L24) the prób. fin of r, v. Y is given by
Y 3
P 6/36 10/36 8/36 6/364/36 2/36
6/36 0sx<l
16/36 .ISx<2
.
F(x)=24/36 2x<3
30/36 3Sx<4
34/36 4Sx<S
SSx
the praph of propability fn and F(x) follows in Fig. (1) and (2)
-38
12/36
10/36
8/36
6/36
4/36
2/36
o
2 3 45
Fig.(T. 4)
F(x)
32/36
28/36
24/36
20/36
16/36
12/36
8/36
4/36
Fig. (1. 3)
-39-
Example I. 26
Solution
if fx) is a densiy fn oft. v. x then the integral |f(x)dx
gives the area under the curve of this density fn. in our example
3
ro-a-1
From graph of tis'density one can prove
(a) as ioliows
Fx)
3/4
L/2
/4
X
2
Fig. 6)
-40
t S
2 3 4 6
P)1/6/61/66_ 1/61/6
xPx,)1/6 2/6 3/6 4/6 S/6
Elx)=-P(a) j=
Example I. 28
In agambling gamea man is paid S$ if he gets all heads
all tails when 3 coins are tossed, and he pays out 3S if either1
2 heads show, what can be expected to win oa the average
f
game
Solutioa
The ample space for the possible outcames when 3 cou
are tossed simultaneously, or equivalently I coin is tossed
times, is
M2
Events
P(y)yPy
+s E-(HH,TT)
aE=(HHT,HTH,THH, HTT,THT,TTH}.
therefore
EM-yP)-
in this case the gambler will, on the average lose 1S per toss of
3 coins.
ExAmple I.29
E(x)-xf(x)d=xd«
--w'PG)
V(X) =E(X-u=}
2-fx-wy'r(s)dk
-43
where E(X)and" dafuiken inthe casethud Xist
v . and 2 in the case that Xis a continuous
r.v. e st
deviation of r. v. Xis defindby
S.D-/VX).
Properties of expectation valueand the variancee
(EC)=C, wihere C is aconstani, V(C) = 0
CECX)=CE(X), Cx)=cv{x)
(iü) EC8(X)+C4,(0)=CE(E(X))+C,El8,(x))
(iv)V(Y+C)=V(Y)
Note:V() E(X -u=E{x-2ux+u°1
-E(x')-24E(x)+H°=E(x')-u?
E(x*)-[E(X)F
Example I. 30
In Ex (1.27), Find V(X) and standard deviation, E(X +
E(5X)
Solution:
VX)- E(X)-[E(Xf,but E{x) =
++3+]=152
-44
{X=15.2-3.5=11.7
S.D=V!.7 =3.4
E(X+1)=E(X)+13.5+ 1=4.5
E(SX)= 5E(X) =5x3.5= 17.5
Example L. 31
Solurion
EC)-Jto
Notc that if g is a function ofr. v. X, then
E(E(X)) =
Pa)
B(x)(x)da
vOx)-1-(0-9
S.D. =1.8.
-45
CHAPTER (4)
RANDOM VARIABLES AND PROBABILITY
DISTRIBUTIONS
we have previously introduced the concepts of populations, samples, variables.
and statistics. Recall that we observe (categorical or numeric) on each element of the
sample, and compute statistics to describe the sample (such as X or P). the idea is
that there is a population of such outcomes, and we observe a random subset of therh
in our sample. The collection of all possible outcomes in population, and their
corresponding relative frequencies is called a probability distribution. Probability
distribution can be classified as discrete or continuous.
In this chapter we will discuss three distributions that are the backbone of
medical statistics: the binomial, the poisson and the nomal. Each distribution has a
of
formula, known as the probability distribution function. This gives the probability
observing an event, and the formulas are given in next sections. The formula contain
certain constants, known as parameters, which identify the particular distribution,
and from which various characteristics of the distribution, such as its mean and
standard deviation, can be calculated.
4.1.1 Binomial distribution
The binomial distribution is one of the most popular distributions in statistics.
To understand the binomial distribution, it helps to first understand binomial
experiments.
A binomial èxperiment is an experiment that has the following properties:
The experiment consists of n repeated trials.
Each trial has only two mutually exclusive outcomes, such as dead or alive,
sick or wel1, full-term or premature,
The probability of success, denoted p, is the same for each trial.
Each trial is independent.
The binomial distribution describes the probability of obtaining x succésses in n
binomial experiments
lfa random variable X foliows a binomial distribution, then the probability that X =
x successes can be found by the
following formula
P(X > 5 patients experience side effects) =1-P(X 5 5)
=1-{P(X = 0)+ P(X = 1)+ P(X = 2)+ P(X = 3)+ P(X = 4)+ P(X = 5)
V(X) = npq
9 npq.(2)
From equations (1) and (2) we can drive the following
S ) =p(X=x) =- x = 0,1,2,.
where:
: mean number of successes that occur during a specific interval.
x: number ofsuccesses.
e a constant equal to approximately 2.71828 .
This expression is called the Poisson distribution with parameter (2), where X is
as X~ P(2).
the random variable, the number ofsuccesses inn trials, its written
The mean of the Poisson distribution is pu = l and the variance is also equal to
Example:
If the number of serious cases coming to a hospital during a night follows a Poisson
distribution with an average of 8 persons per night, then:
a) What is the probability that 9 serious cases coming in next night?
_
0! 1!
Then,
PX=2) = e = 0.1839
21
And the standard deviation of X = va = Vi=1
1Q scores.
Salaries.
variable X has a normal distribution with mean u and
Some properties random
characteristic:
variance o', X~(4,o*), has several important locations.
means have different
Normal distributions with different
variances have different degrees of spread
Normal distributions with different
(dispersion).
The mean, mode and median are all equal.
the mean, u).
The is symmetric at the center (i.e. around
curve
left of center and exactly half the values
Exactly half of the values are to the
are to the right.
normal curve between any two numbers
A s with any p.d.f, the area under the
X where
< gives P(r, <X <) and the total area uñder the
curve is l.
Bell curve
Area=1
PLXS a)=P 8=P(Z<4
=
P(Z<Z,)-P(Z «Z,)
Example:
and normally distributed with
Let X be hemoglobin level for healthy adult males chosen
mean =15 and variance o=
0.64 A healthy adult male has been
than
selected male has hemoglobin level less
randomly, find the probability that the
13, i.e. p(X <13).
Solution:
-0.4938 =0.0062
0.5- P(0 <Z < 2.5) =0.5
that 0.62% ofhealthy adults males
have hemoglobin level less than 13.
This means
Example:
distributed with mean 3.4 and
Let Y be the birthweighted of babies and normally
find the probability that a
variance 0.1225. a baby has been selected randomly,
randomly chosen baby has birth weight
between 3 and 4 kg i.e. p(3 <Y<4).
Solution:
This means that 82.93% of babies have birth weight between 3 and 4 kg.
fx) P(X x) Ci p'q,x 0,1,2,..,n
= = =
=
Where C= -
n!
9=(1-p)
where:
n: number of trials.
x: number of successes.
p: probability of success on a given trial.
C: the number of ways to obtain k successes in n trials
This expression is called the binomial distribution with parameters (n, p), where X
is the random variable, the number of successes in n trials, its written as X~B(n pP
and the mean and variance of the binomial distribution are u =
np, o =
npq,
respectively.
Example:
Suppose that the probability that a man has covid-19 is 0.15 . if6 men are selected
randomly, find
i. The probability distribution of the number of men out of 6 with covid-19.
i. The probability that three men have covid-19.
i. The probability that at least one man have covid-19.
iv. The probability that at most two nien have covid-19.
V. The expected number ofthe men out of 6 with covid-19.
vi. The standard deviation ofthe men out of 6 with covid-19
Solution:
X the number of men has covid-19, P=0.15 the probability ofthe man has covid-19,
-6 the number oftrails, i.e. { X~ B(6; 0.15) }
1. The probability distribution cf X is:
P(X =x) = C (0.15)*(0.85)*,x=0,1,2,.,6
1. PX=3)=C (0,15)'(0.85) = 0.041
P(X2 ) =1-P(¥ <1) = 1-P(X =0) =l-C$ (0.15)*(0.85)° = 1-0.377 = o.623
ii.
iv.
P(X 2) = P(X = 0) +P(X = 1)+P(X = 2)
a) p(X =9) = *
8 e0.124
9!
b)p(7X <11) p(X 8) +p(X 9) +p(X =10) = =
=
_8e8 e8 e
8! 9! 10!
=
0.140+0.124+0.099 =0.363
c)X-P(l =2x8 =16)
PX=18) = 16"e16
0.083
18!
Example:
Suppose that the number of cases of covid-19 recorded. in the Zeliten
department in a day has Poisson distribution with an average of 10 cases, isolation
What is the probability that the number
7 cases in the next day?
of cases of covid-19 will be
ii) What is the probability that the number of
cases ofcovid-19 willbe
more than 3 cases in the next
day?
iii) What is the probability that the number of cases of covid-19 will be
15 cases in three days?
Solution:
Note that X P(2=10), then:
P(X=7)= 10 e10o 0.09
i)
7!
ii) pX> 3) =1-p(X < 3) =1-{pX = 0)+ p(X =1)+p(X =2) +p(X =3
For = j I - 3 0 , X, =4+3a,
Distribution
Standard Normal
4.2.2 The called the
variance a ' =l is
distribution with a
mean H = 0 and because
.The normal it's very important
distribution and is
denoted by N(0,1) and probabili ties of
calculated from the
standard normal can be
normal distribution
probabilities of any
standard normal distribution.
Z defined by
then the
random variable
If X (u,o*),
Important
result:
this is also
sometimes called the Z
distributed as Z N(O, 1),
is
score.
standard
score or
normal
distribution N(O, 1):
the probabilities of
standard
Calculate distribution
normal
of standard
calculate the probabilities
show how to
We will
example:
the following
N(0, 1) in
Example:
find these probabilities:
If Z N(0, 1), 2.42) 4. P(0.5
Zs 2.19)
3. P(-1.33< Z
s
2. P(Z2 0.81)
1. P(Z s1.67)
0.9525
P(Z s1.67)
=
1.
0.2090
P(Z 2 0.81)
=
2.
s 2.42)
2.42) = P(-1.33< Z s 0) + P(0s Z
3. P(-1.33s Z <
=
P(0 Z s1.33) + P(0s Z s2.42)
0.4082+0.4922 = 0.9004
=
4.
= 0.4857-0.1915 = 0.2942