


















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































Purpose By the end of the course the student should be able to solve problems involving
probability distributions of a discrete or a continuous random variable.
Objectives
By the end of this course the student should be able to; (1) Define the probability mass, density and distribution functions, and to use these to determine expectation, variance, percentiles and mode for a given distribution (2) Appreciate the form of the probability mass functions for the binomial, geometric, hyper-geometric and Poisson distributions, and the probability density functions for the uniform, exponential, gamma , beta and normal, functions, and their applications (3) Apply the moment generating function and transformation of variable techniques (4) Apply the principles of statistical inference for one sample problems.
Random variables: discrete and continuous, probability mass, density and distribution
functions, expectation, variance, percentiles and mode. Moments and moment generating
function. Moment generating function and transformation Change of variable technique for
univariate distribution. Probability distributions: hyper-geometric, binomial, Poisson, uniform, normal, beta and gamma. Statistical inference including one sample normal and t tests.
Pre-Requisites : STA 2100 Probability and Statistics I, SMA 2104 Mathematics for Science
Course Text Books
Course Journals:
Further Reference Text Books And Journals :
a) HJ Larson Introduction to Probability Theory and Statistical Inference(Probability and Mathematical Statistics) 3rd ed., Wiley, 1982 b) Uppal, S. M. , Odhiambo, R. O. & Humphreys, H. M. Introduction to Probability and Statistics. JKUAT Press, 2005 c) I Miller & M Miller John E Freund’s Mathematical Statistics with Applications, 7th ed., Pearsons Education, Prentice Hall, New Jersey, 2003 ISBN: 0131246461 d) Statistical Science (Stat. Sci.) [0883-4237] e) Journal of Mathematical Sciences f) The Annals of Applied Probability
In application of probability, we are often interested in a number associated with the outcome of a random experiment. Such a quantity whose value is determined by the outcome of a random experiment is called a random variable. It can also be defined as any quantity or attribute whose value varies from one unit of the population to another. A discrete random variable is function whose range is finite and/or countable, Ie it can only assume values in a finite or countably infinite set of values. A continuous random variable is one that can take any value in an interval of real numbers. (There are uncountably many real numbers in an interval of positive length.)
Consider the experiment of flipping a fair coin three times. The number of tails that appear is noted as a discrete random variable. X= number of tails that appear in 3 flips of a fair coin. There are 8 possible outcomes of the experiment: namely the sample space consists of
X 0 1 , 1 , 2 , 1 , 2 , 2 , 3
are the corresponding values taken by the random variable X. Now, what are the possible values that X takes on and what are the probabilities of X taking a particular value? From the above we see that the possible values of X are the 4 values X=0, 1,2, 3
Ie the sample space is a disjoint union of the 4 events { X = j } for j =0,1,2, Specifically in our example: X 2 =TTH, HTT,THT X 3 = TTT
Since for a fair coin we assume that each element of the sample space is equally likely (with probability 81 , we find that the probabilities for the various values of X, called the probability
distribution of X or the probability mass function (pmf). can be summarized in the following table listing the possible values beside the probability of that value X 0 1 2 3 P(X=x) 81 8 3 8
3 8 1
Note : The probability that X takes on the value x , ie p(X x), is defined as the sum of the
probabilities of all points in S that are assigned the value x. We can say that this pmf places mass 83 on the value X= 2.
The “masses” (or probabilities) for a pmf should be between 0 and 1. The total mass (i.e. total probability) must add up to 1.
Definition : The probability mass function of a discrete variable is a graph, table, or formula that specifies the proportion (or probabilities) associated with each possible value the random variable can take. The mass function P(X x) (or just p(x) has the following properties:
0 p(x) 1 and p(x) 1 allx
More generally, let X have the following properties i) It is a discrete variable that can only assume values x 1 , x 2 ,.... xn ii) The probabilities associated with these values are P ( X x 1 ) p 1 , P ( X x 2 ) p 2 ……. P ( X xn ) pn
Find the value of the constant c and P X 3
x x for 1 , 2 ,..... ( 1 )
2 f( )
can serve as a pmf of a random variable X.
c)f( x ) c 61 x for x 0 , 1 , 2 , 3 ..... d)f( x ) c 2 ^ x for x 0 , 1 , 2 ,....
A continuous random variable can assume any value in an interval on the real line or in a collection of intervals. The sample space is uncountable. For instance, suppose an experiment involves observing the arrival of cars at a certain period of time along a highway on a particular day. Let T denote the time that lapses before the 1st^ arrival, then T is a continuous random variable that assumes values in the interval[ 0 ,)
To illustrate the concept of a probability density function, consider a histogram with unequal class widths. F requency density is plotted on the vertical axis, where
classwidth
frequency frequencydensity=.
One can also draw a relative frequency histogram in which the area of a bar corresponds to the proportion of the data falling into the corresponding interval. The relative frequency is
defined as Totalfrequency
frequencydensity Relativefrequency=.
Eg The relative frequency histogram below shows the distribution of ages of the UK population.
0
0 10 20 30 40 50 60 70 80 90 100 Relative frequency
density
Age
Relative frequency histogram to show the age distribution in the UK
The area of each bar corresponds to the proportion of the population with ages in that interval. The total area of all the bars is 1.
The distribution of the ages can be modelled by a curve. This curve is called a probability density function.
Definition: A probability density function (or p.d.f.) is a curve that models the shape of the distribution corresponding to a continuous random variable. The function has several important properties If f( x ) is the p.d.f corresponding to a continuous random variable X and if f( x ) is defined for (^) X then the following properties must hold:
i) f( x ) 0 for all x. i.e. the graph of the p.d.f. never dips below the x -axis.
ii) f( )d 1
^
(^) x x for all x. i.e. the total area under a p.d.f. is 1.
iii)
b pa x b x x a
f( ) d i.e. probabilities correspond to areas under the curve.
Example 1 : Sketch the graph of each of the following functions. Decide in each case
whether it could be the equation of a probability density function: (a) 0 elsewhere
f( )
3
x^ x
b) 0 elsewhere
f( )
2 32
1
x x x c) 0 elsewhere
f( )
2
x x x
Solution The function is non-negative everywhere. For f to represent a p.d.f, we need to check that f( )d 1 all x
(^) x x . But:
1 -^3 ^212 ^02121 allx
f( )d 0 ( )
x x x dx x
So f( x ) could not represent a probability density function.
The function is non-negative everywhere.
If f represents a p.d.f., then f( )d 1 all x
x x^
0 ( 32 ) 1
f( )d 24 3 36
32 1
6 2
2 3 32 1
6 2
2 32 1 allx
^
x x x
x x x x dx
So f( x ) could represent a probability density function.
Solution
3 2 2
(^21) 0 4
1
_ 3 4
3 2
(^21) 1 4
P P P dx x dx x x
Exercise 1.
elsewhere
cx x 0 ,
f(x) Find the
elsewhere
x k x
0 ,
f(x) 5 Find the value
elsewhere
k y x 0 ,
f(y) Find
0 , otherwise
f( )
k x^2 x
0 , otherwise
f( )
k r r r
a) Sketch the p.d.f of R b) Find k hence compute P(1 ≤ R ≤ 3).
function
0 , otherwise
f()
ke^0.^001 t t
a) Sketch the probability density function. b) Find the value of the constant k. c) Find P(1500 ≤ T ≤ 2000).
0 , otherwise
f( )
k y^2 x x Find
0 , otherwise
f (x)
kx x x
f(x) 3
1
6
1
x
x
Sketch the graph of f(x) hence find P ( 1 x 3 )
elsewhere
k x
k x x x 0 ,
f( ) 34
2
Find
elsewhere
k x x
kx x
f(x) Find
the value of the constant k hence compute P X 3 and P 1 X 3
elsewhere
c t t t 0 ,
f()
2
a) Find the value of the constant c and the cdf of T b) Find the probability that a customer will wait for more than 3 minutes c) A customer has been queuing for 3 minutes, find the probability that this customers will be queuing for at least 7 minutes d) Three customers are selected at random, find the probability that exactly 2 of them had to queue for longer than 3 min
Definition: For any random variable X, we define the cumulative distribution function (CDF) ,
F( x ) as
f(t)dtIfXis continuous
P(T t)IfXisdiscrete F( ) P x
x
x X x t for every x.
Here t is introduced to facilitate summation /integration//
Properties of any cumulative distribution function lim F( ) 1 and limF( ) 0 x x
x x
F( x )is a non-decreasing function.
F( x )) is a right continuous function of x. In other wordslimF(t) F( ) t x x
Reminder If the cdf of X is F( x )and the pdf is f( x ), then differentiate F(x) to get f(x), and
integrate f( x )to get F( x );
Theorem: For any random variable X and real values a < b,P a X b F( b )-F( a )
Example 1
Let X be a discrete random variable with pmf given by
elsewhere
x x x 0 ,
1 for 1 , 2 , 3 , 4 , 5 f( )^20
1 .
Determine the cdf of X hence computeP X 3
Solution
201 201 2 ^ ^ ( 403 ) 1
20 F( ) f(t)^1 (t 1) ( 2 3 .... ) 4 1
(^) x xx
x
t
x
t
x x x
1 for 5
for 1 , 2 , 3 , 4 , 5
0 for 1 F( ) ( 403 ) x
x
x x xx Recall for an AP S (^) n n 2 2 a n 1 d
P X 3 1 P X 3 1 ^340 ^6 2011
0 , elsewhere
g( )
3 6
(^1) x x x Find the
c.d.f. of X hence obtain P( X < 1).
otherwise
x x k
x x 0 ,
f( ) 21
2
1
where k is a
constant. Sketch a graph of f(x) hence find the value of k and the cdf of x hence compute P ( 0. 5 x 1. 5 )
elsewhere
x x
x
x
x
x
f( )
2
Sketch f(x). Also find the cdf of x and hence compute p ( X 8 )
y
y and
F(x) 0 for Y 3 , find P X 5 , P X 8 and the pdf of X
also find the pdf of x
a)
elsewhere
x
x x 0 ,
f( )^13
(^13) b)
elsewhere
x
x
x
x (^) x
x
f( ) 2 ( 3 )
(^12)
2
elsewhere
k x
k x x x
f(X)
2
where k is a constant. Show that k 91
a) Find the cumulative distribution function F( x ) and the mean of X. b) Show that the median of X lies between x = 2.6 and x = 2.
given by
x
x x x
x x
a) Find the median of X , giving your answer to 3 significant figures. b) Find, in full, the probability density function of the random variable X. c) Find P( X> 1.2)
t
k t t t
t t where k is a positive constant.
a) Show that k ^1627 hence and find the probability density function f( t ) of T. b) Find the proportion of students who spend more than 1 hour on homework.
c) Show that E( T ) = 0.9 and F(E( T )) = 0.4752. d) A student is selected at random. Given that the student spent more than the mean amount of time on homework, find the probability that this student spent more than 1 hour on homework.
Give the pdf of a random variable say X, we can obtain the distribution of a second random variable say Y provided that we know some functional relationship between X and Y say
Y u ( X ). Eg Y 2 X 3 , Y X^3 , Y X c etc
For a 1-1 relationship between X and Y eg Y 2 X 3 , f(x)andg(y)yields exactly the same
probabilities only the random variable and the set of values it can assume changes.
Example 1
Give the pmf of a random variable X as
elsewhere
x x
x
0 ,
for 1 , 2 , 3 f( )^6 find the pmf of Y X^2
Solution The only values of Y with non-zero probabilities are Y= 1 , Y= 4 andY= 9. Now
P Y = 1 P X 2 = 1 P X= 1 61 P Y = 4 P X 2 = 4 P X = 2 31 and P Y = 9 P X 2 = 9 P X= 3 21
In some cases several values of X will give rise to the same value of Y. The procedure is just the same as above but it is necessary to add the several probabilities that are associated with each value x that provides a unique value y.
Example 2 Given the pmf of a r.v X as
elsewhere
x x x 0 ,
for 0 , 1 , 2 , 3 , 4 15
f( ) find the pmf of
2 Y X 2 Solution
x 0 1 2 3 4 y 4 1 0 1 4
P Y = 0 P X = 2 51 P Y = 1 P X = 1 P X= 3 152 154 52 P Y = 1 P X = 0 P X = 4 151 31 52 Therefore the pmf of Y can be written as
__ Exercise 1.
elsewhere
x x 0 ,
for 1 , 2 , 3 , 4 , 5 , 6 f( )^6
1 , Obtain the pmf of
Y 2 X^2 and Z X 3
elsewhere
x
x x 0 ,
for 0 , 1 , 2 , 3 18
f( )
2 , determine the pmf of
P Y = y 52 52 52
f( x ) 0 otherwise. Determine the density function of Y (^) X^1 1.
otherwise
x x 0
the probability density function of Y tan ^1 (^2 x )
range is 0 x 1 a)
otherwise
e x x
x
0
f( )
2 b)
otherwise
x x 0
(x-3), 3 5 f( )^2
1
elsewhere
x x x 0 ,
for 1
If U X^2 , what
is the probability density function f(u) of U?
1.7.1 Expected Values One of the most important things we'd like to know about a random variable is: what value does it take on average? What is the average price of a computer? What is the average value of a number that rolls on a die? The value is found as the average of all possible values, weighted by how often they occur (i.e. probability) Definition : Let X be a random variable with probability distribution p ( X x ). Then the
( ) ifXiscontinuous
( ) ifXisdiscrete E( )
xp X x dx
xp X x x x
Theorem : Let X be a r.v. with probability distribution p ( X=x ) and let g ( x ) be a real-valued function of X. ie , then the expected value of g ( x ) is given by
( ) ( ) ifXiscontinuous
( ) ( ) ifXisdiscrete Eg( )
gx pX x dx
g x pX x x x
Theorem : Let X be a r.v. with probability distribution p ( X x ). Then
(i) E ( c ) = c , where c is an arbitrary constant. (ii) Eax b a b where a and b are arbitrary constants
(iii) E kg(x) k E g(x) w here g ( x ) is a function of X
(iv) E ag 1 (x) b g (^) 2 (x) a Eg 1 (x) b Eg 2 (x) and in general
n ci i 1
i
n
i 1
E ci gi(x) Eg(x)
are functions of X. This property of expectation is called linearity property Proof
We will sketch the proof using a continuous random variable since the proof using the discrete random variable is similar and was also discussed in probability and statistics I.
cPX xdx c PX xdx c c Allx All x
(i) Ec (^) ( ) ( ) ( 1 )
xP X xdx P X xdx a b
x x P X xdx xP X xdx PX xdx
Allx All x
Allx Allx Allx
(ii) Ea b (a b) ( ) a ( ) b ( )
(iii) E kg(x) kg ( x ) P ( X x ) dx k g ( x ) P ( X x ) dx k E g(x) Allx All x
(^)
Eag (x) g (x) Eg (x) Eg (x) iefrompart iii
(iv) Eag(x) g(x) ag(x) g(x) ( ) ag(x) ( ) g(x) ( )
1 2 1 2
1 2 1 2 1 2
Eb a b
b b P X xdx P X xdx b P X xdx Allx Allx All x
1.7.2 Variance and Standard Deviation
given by Var ( X ) ^2 E ( X )^2 .The units for variance are square units. The quantity that has
of Var(X).
Theorem: Var ( X ) E ( X )^2 E ( X )^2 ^2
Proof:
Var ( X ) E ( X )^2 E X^2 2 X ^2 E ( X )^2 2 E ( X )^2 E ( X )^2 ^2
Theorem: Var ( aX b ) a^2 var( X )
Proof: Recall that E aX b a b therefore
Var ( aX b ) E ( aX b )( a b )^2 E a X ^2 E a 2 X ^2 a^2 E X ^2 a^2 var( X )
Remark (i) The expected value of X always lies between the smallest and largest values of X. (ii) In computations, bear in mind that variance cannot be negative!
Example 1 Given a probability distribution of X as below, find the mean and standard deviation of X.
X 0 1 2 3 P(X=x) 1/8 1/4 3/8 1/
Solution
X 0 1 2 3 total p ( X x )^181438141 xp ( X x ) 0 14 34 34 74 x^2 p ( X x ) 0 14 32 94 4
( ) ( ) 1. 75
3
0
x
standard deviation
P(Z=z) 16 13 14 x y If E ( Z ) 432 , find the values of x and y hence determine the variance of Z
elsewhere
m m
0 ,
f(m) 36 ,
find the mean and variance of M
elsewhere
y y
0 ,
f(y) 10
5 ,
calculate (^) E ( Y )andvar(Y)
elsewhere
kx x 0 ,
for 1 , 2 , 3 , 4 f(x) , find the value of the constant k
hence obtain the mean and variance of X
elsewhere
kx x
kx x P X x 0 ,
a) Show that k 181 hence find (^) E ( X )and E ( X^2 ) b) Calculate var 3 4 X , give your answer to 3 significant figures. 11 A biased die with six faces is rolled. The discrete random variable X represents the score of the uppermost face. The probability distribution of X is shown in the table below X 1 2 3 4 5 6 P(X=x) A a a b B 0. a) Given that E(X) = 4.2, find the values of a and b. b) Show that E X^2 20. 4 c) Find var 5 3 x
12 A discrete random variable X has probability function
elsewhere
k x x X x 0 ,
2
a) Show that k 61 b) Find E ( X )
c) Show that E ( X^2 ) 34 d) Findvar 1 3 x 13 A team of 3 is to be chosen from 4 girl and 6 boys. If X is the number of girls in the team, find the probability distribution of X hence determine the mean and variance of X 14 A fair six sided die has; ‘1’ on one face, ‘2’ on two of its faces and ‘3’ on the remaining three faces. The die is rolled twice. If T is the total score write down the probability distribution of T hence determine; a) the probability that T is more than 4. b) the mean and variance of T
15 The pdf of a continuous r.v R is given by
elsewhere
kr r 0 ,
for 0 4 f(r) , (a) Determine c. hence
Compute P(1 0 r 2 ),E(X)andVar(X).
16 A continuous r.v M has the pdf given by
elsewhere
k m M 0 ,
( 1 )for 10 f(m) 10 , find the value of
the constant k, the mean and the variance of X
17 A continuous r.v X has the pdf given by
elsewhere
k x x 0 ,
( 1 )for 0 1 f(x) , findt the value of
the constant k. Also find the mean and the variance of X
18 The lifetime of new bus engines, T years, has continuous pdf
0 , f 1
f 1 f(t)
2 i T
dt i T find the
value of the constant d hence determine the mean and standard deviation of T 19 An archer shoots an arrow at a target. The distance of the arrow from the centre of the
target is a random variable X whose p.d.f. is given by
0 , f 3
( 3 +2x-x ) f 3 f(x)
2
i x
k i x find
the value of the constant k. Also find the mean and standard deviation of X 20 The random variable Y has probability density function f( y ) given by
elsewhere
kya y x 0 ,
f(y) where k and a are positive constants.
a) Explain why a ≥ 3 and then show that 9 ( 2 )
a
k
b) Given that E( Y ) = 1.75 , show that a = 4 and write down the value of k. c) For these values of a and k , sketch the probability density function, d) Write down the mode of Y.
21 A continuous random variable x has the following pdf
otherwise
a bx x x 0 ,
f( ) where a and b
are constants. Show that 10 a 25 b 2
a) Given ^ 12
E X , find a second equation in a and b hence find the values of a and b.
b) Find the median of X 22 The queuing time X minutes of a customer at a till of a supermarket has a pdf
otherwise
xk x x k x 0 ,
f( )^32
3
a) Show that k 4. Also find E ( x )andvar( x ) b) Find the probability that a randomly chosen customers queuing time will differ from the mean by at least half a minute
23 The probability density function f( x ) can be written in the following form.
otherwise
b ax x
ax x x 0 ,
f( )
a) Find the values of the constants a and b. b) Show that σ, the standard deviation of X , is 0.816 to 3 decimal places. c) Find the lower quartile of X. d) State, giving a reason, whether P(2 – σ < X < 2 + σ) is more or less than 0.
24 A continuous r.v X has the pdf given by
elsewhere
k x x
k x x
f(x) , find the value of
the constant k. Also find the mean and the variance of X
Exercise 1.
elsewhere
k x x 0 ,
( 1 ) for 0 1 f(x) , find the mode.
0 ,otherwise
f(x)
x^2 x x Find the mode of X.
elsewhere
e x x 0 ,
for 0 f(x) 2 2
1 .
Determine the 25th^ percentile of the distribution of X.
x
k x x x
x x
0 , otherwise
f(x) 21
2
k x x
k x x x
a) Find the C.D.F of X and verify that the lower quartile is at x = 2. b) Obtain the mode andt the median value of X.
Among the discrete distributions that we will discuss in this topic includes the Bernoulli, binomial, Poisson, geometric and hyper-geometric
Definition : A Bernoulli trial is a random experiment in which there are only two possible outcomes - success and failure. Eg Tossing a coin and considering heads as success and tails as failure. Checking items from a production line: success = not defective, failure = defective. Phoning a call centre: success = operator free; failure = no operator free. A Bernoulli random variable X takes the values 0 and 1 and P ( X 1 ) p and
P ( X 0 ) 1 p
Definition : A r.v X is said to be a real Bernoulli distribution if it’s pmf is given by;
otherwise
p p forx P X x
x x
0
1
We abbreviate this as X~B(p)ie p is the only parameter here. It can be easily checked that
2.1.1 Binomial Distribution Consider a sequence of n independent, Bernoulli trials, with each trial having two possible outcomes, success or failure. Let p be the probability of a success for any single trial. Let X
denote the number of successes on n trials. The random variable X is said to have a binomial distribution and has probability mass function
P ( X x ) n Cr px ( 1 p ) n x for x 0 , 1 , 2 ..... n
We abbreviate this as X ~Bin( n ,p)read as “X follows a binomial distribution with
parameters n and p ”. (^) n Cr Counts the number of outcomes that include exactly x successes
and n x failures. The mean and variance of a Binomial random variable are respectively given by;
Let’s check to make sure that if X has a binomial distribution, then ( ) 1 0
^
n
x
P X x. We will
need the binomial expansion for any polynomial:
therefore ( 1 ) 1 1 1 0 0
n n n x
x nx n x
n
x
x nx n r
n p q C pq C p p p p
Example 1 A biased coin is tossed 6 times. The probability of heads on any toss is 0:3. Let X denote the number of heads that come up. Calculate: (i) P ( X 2 ) (ii) P ( X 3 ) (iii) P ( 1 X 5 )
Solution If we call heads a success then X has a binomial distribution with parameters n=6 and p=0:3.
(i) P ( X 2 ) 6 C 2 ( 0. 3 )^2 ( 0. 7 )^4 0. (ii) P ( X 3 ) 6 C 3 ( 0. 3 )^3 ( 0. 7 )^3 0.
(iii) ( 1 5 ) ( 2 ) ( 3 ) ( 4 ) ( 5 )
Example 2 A quality control engineer is in charge of testing whether or not 90% of the DVD players produced by his company conform to specifications. To do this, the engineer randomly selects a batch of 12 DVD players from each day's production. The day's production is acceptable provided no more than 1 DVD player fails to meet specifications’. Otherwise, the entire day's production has to be tested. a) What is the probability that the engineer incorrectly passes a day's production as acceptable if only 80% of the day's DVD players actually conform to specification? b) What is the probability that the engineer unnecessarily requires the entire day's production to be tested if in fact 90% of the DVD players conform to specifications? Solution Let X denote the number of DVD players in the sample that fail to meet specifications. a) In part a we want P ( X 1 )with binomial parameters n 12 andp0.
b) In part b we require P ( X 1 ) 1 P ( X 1 )with parameters n 12 andp0.1.
P ( X 1 ) P ( X 0 ) P ( X 1 ) 12 C 0 ( 0. 1 )^0 ( 0. 9 )^12 12 C 1 ( 0. 1 )^1 ( 0. 9 )^11 0. So P(X1)0.
Example 3 Bits are sent over a communications channel in packets of 12. If the probability of a bit being corrupted over this channel is 0.1 and such errors are independent, what is the probability that no more than 2 bits in a packet are corrupted?