You are on page 1of 19

1

LA
Second class
RANDOM VARIÁBLES ÄND
THEIR DISTRIBUTIONS

Concept ofa random variables:


When ode tosses a coin 3 tumes, the sample space of his

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
. . *: .

the samplre space.

The number 0, 1, 2, and 3 are random quantities


determined by ihe outcome of the experiment. Tbey may be
thought of as tae values asaumed by sone random variable
X which in this case represents the number of beads when a coin
is tossed 3 times.

The value of a random variable is a real value determined


by
the outcome of an experimentthat variesfrom trail to trail
Ln the coin-tossing above, we notice that the random vaniable X
assumes the value 2 for all elements in the subset

E- (HHT, HTH, THH}

-34
.

f the sample space S. That is, each possible value of X.

reptesents an cvent thatl is a subset of the sample space for the

gven experinent.

Random vanables (r. vs) may be classified as follows

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.

2 Continuous Random variables


are those that take on a continuous values within the given
irterval(e.g. a Sxsb) , for example:

i The waiting time of a customer for servic.

i) The deviation distance of a shot from the centre of target.

Random variables usually denoted by capital latters,

Example I. 23

Coasider the experiment of tossing wo dice, then

S {(i,j); i,j= 1,2,-,6.

Several r.v.s can be defined.Let X denoted the sum of the two


uptumed faces, then

-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

X and Y are r.v.s. We see


that X ca
be shown that both
It can
take on the values
2,3,..,12 and ¥ can
the values
take on

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,

is defined to be the probability


function (abbreviated by p. fn:) of
X. Therefore the discrete r.v. X takes the values x

with probability P(x,),P(z,),..,P(x).


Tbe p. fn. P) has the following

P(x)>0 for j=12,.


P(x)=0 for x#

) Px)=

-36
Axample I. 24

Ia Ex. (1.23) Grd p. fn ofr. v. Y

Solution ' * * * * * * * * * *
*

P(O)=P(Y=0)= P{(1,1),(2,2)(3,3).(4,4),(5,5),(6,6)} =36


and so on one can obtain thé following

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

ifX is discrete r.v. then

F(x)= Pa)

4 distribution function is uniquely defued for each r.v. if it is


CnoWn, it can be used to find the probability of events defines in

-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

A contiauous r.v. x that can assume values between x = l

and x 3 has a density


.
fn given by f(x)=.

(a)show that the area under the curveequal to1


(b) Find P(2<x«2.5), P(x < 16).

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

S {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}


each of these 8 possibitities are equally lkely and bence occt
with probability equal to
The random variable of interest is Y, the amount the
gambler can win, and the possible values of Y and associate
probabilities are given in the following table

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

InEx.. 26)Find E(X)


Solution

E(x)-xf(x)d=xd«

Yaniance and standrddevition


Let X be ar. v. then thea variance of it, is given by

--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

In Ex. (L26) find VX) and standard deviatio

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.

4.1 Discrete probability distribution:


if we toss A fair coin twice, Let X be the number of heads that are observed, the
possible values that X can take are 0, 1, and 2. Each ofthese mumbers corresponds to
an event in the sample space S={h, ht, th, t} of equally likely outeomes for this
experiment: X = 0 to ft), X = l to (ht, th}, and X = 2 to {h. The probability of
each of these events, hence of the corresponding value of X, can be found simply by
counting, to give
012
P(X=x) | 0.25 0.5 0.25

This table is the probability distribution of X.

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)

=1-{C (0.05) (0.95) 0+C0 (0.05) (0.95)" t+Co0 (0.05)*(0.95)"}


=1-0.616 0.384
Example:
If X be a random variable that has Binomial Distribution with mean 12 and variance
9, then find: p(X =2)?
Solution:
X B(1; p)
E(X) = np
12 = n p . . )

V(X) = npq
9 npq.(2)
From equations (1) and (2) we can drive the following

9 =124 q=0.75 p=0.25 n =48


Then X B(n=48; p=0.25)
0.0625x0.00000179
pX =2) =C (0.25) (0.75) 2=C (0.25)'(0.75) =1128x
= 0.000126

4.1.2 Poisson distribution


To
most popular distributions in statistics.
The Poisson distribution is one of the
first understand Poisson experiments.
understand the Poisson distribution, it helps to
that has the following properties:
A Poisson experiment is an experiment
the experiment can be counted.
The number of successes in
T h e mean number of successes that occurs during a specific interval of time
(or space) is known.
Each outcomeis independent.
the probability of obtaining x successes during a
The Poisson distribution describes
given time interval.
probability that X=x
Poisson distribution, then the
If a random variable X follows a
successes can be found by
the following formula:

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

4.2 Continuous probability.distribution:


4.2.1 Normal distribution:
distribution that
A normal distribution, sometimes called the bell curve, is a
occurs naturally in many situations. For example,
the bell curve is seen in tests like
while smaller
the SAT and GRE. The bulk of students will score the average (C),
smaller percentage of students
numbers of students will score a B or D. An even
the
score an F or an A. This creates a
distribution that resembles a bell (hence
fall to the left of
nickname). The bell curve is symmetrical. Half of the data will
the mean; half will fall to the right.
it's widely used in business,
Many groups follow this type of pattern.
That's why
bodies like the FDA:
statistics and in governmment
Heights of people.
Measurement errors.
Blood pressure.
Points on a test.

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(X2 a) = 1-P(X S a) =1-P(Z <

Pla s Xsb)=P 4 s - P z , «2<7,)


O

=
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:

PX <13) P( = =P(Z<-2.5) = 0.5-P(-2.5 <Z< 0


0.8

-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:

s4)-p Y =P-1145 Zs1.7)


=P(-1.14 sZ s0)+P(0< Z<1.71) =P(0<Z s1.14)+P(0<Z<1.71)
.

=0.3729 +0.4564 = 0.8293

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)

C(0.15)"(0.85) +C (0.15)'(0.85)*+C(0.15) (0.85)-2


C (0.15) (0.85)* +C(0.15) (0.85) +C(0.15) (0.85)
=
0.377+0.399 +0.176 0.952 =

. The expected number of the men out of 6 with covid-19 (mean) is


n p = 6*0.15 =0.9
vi. The standard deviation of the men out of 6 with
covid-19 is:"
d
npy=v6*0.15 0.85 =V0.765 =.875
Example:
suppose that it is known that 5% of adults who take a
certain medication experience
negative side effects, if we selected 100 adults
more than 5 patients will randomly, find the probability that
Solution:
experience negative side effects
X: the number of adults
who take a certain medication
effects, P=0.05 the experience
probability that adults who take a certain medicationneyative
side
negative side effects, n100 the
number of trails, i.e. { X B(100; experience
0.05)}
~
What is the probability that
ght?
between 7, 11 serious cases
What is the probability that 18 coming in the
serious cases coming in next
Solution: the next
two
nights?
Note that X~ P(A =8), p(X =x)=4e -, *=0,1,2,.. then:

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

10 1 1 0 ' ,10 e-10 103 e-10


0! 1! 2! 3!

=1-{0.0000454 +0.000227 +0.00757)=0.9922


ii) X-P(2 =3x1030)
PX =15)=30 =0.00103
15!
Example:
then find PlA =
DC
a random variable has Poisson, p(X =0) =
p(X =
1),
and the standard deviation of X.
Solution:
XP( 2)
PX =
0) = p(X 1) =
notable normal probabilities:
aa few
<X<u +o) =0.6826
are
here
icular_
A l + 0 , P(u=a
DFor X =4-O P(/-20 < X <u + 20) =
0.9544
For x
=/-20, * = 4+20, 0.9972
P(u-3a< X <u+3a)
=

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)

Solution: distribution table a s follow:


normal
from the standard
probabilities
We can find these

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
=

Zs 2.19)- P(0<Z< 0.5)


P(0.5s7s2.19) P(0 s
=

4.
= 0.4857-0.1915 = 0.2942

Calculate the probabilities of normal distribution N(A1, a):


normal distribution N(i.a*)
We will show how to calculate the probabilities of any
1) as follows:
from Z- 1able changing it to standard any normal distribution N(0,
by

You might also like