SQQS1043 Probability & Statistics: Matehematical Expectation

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 75

SQQS1043

PROBABILITY &
STATISTICS

CHAPTER 1
MATEHEMATICAL EXPECTATION

SQQS1043 Statistics and Probability 1


Learning Outcomes:

• Review on probability distribution function and cumulative


distribution function of discrete and continuous random
variable.
• Able to derive and calculate the expectation involving
discrete and continuous distributions
• Solve the problems involving discrete and continuous
distributions.

SQQS1043 Statistics and Probability 2


Review on Probability Distribution Function
•  Consider an experiment of tossing a coin twice.
• The results contain several simple events such as having Head
& Head, Tail & Tail and others. Thus:
=> The sample space S = {HH, HT, TH, TT}
Outcomes X
1/2 H HH 2
H
1/2 1/2 T HT 1

1/2 H TH 1
1/2 T
1/2
T TT 0

3
SQQS1043 Statistics and Probability
Continue…
• Now consider that we are interested to know the number of
heads occurred in the outcome of the experiment
• Let X be the number of heads occurred
• We then have the set of numbers {2, 1, 1, 0}
• We can further assign these numbers to a variable X
• Next, we can have event X with value such as {X=2}
• Since variable X possessed integer values (usually through
counting process), variable X is of type discrete.
• Thus, X is a discrete random variable

SQQS1043 Statistics and Probability 4


Probability

Table 1: Equivalent of Events X & Actual Events


Values of X Equivalent events Probability of X

(X=2) {HH} P(X=2) = P(HH) =

(X=1) {HT} or {TH} P(X=1) = P(HT) + P(TH) = ¼ + ¼ = ½

(X=0) {TT} P(X=0) = P(TT) =

SQQS1043 Statistics and Probability 5


Notation

• Capital letter X and Y (for example) denotes the random


variable
• Small letters x and y (for example) denotes their respective
unknown value
• Then, (X=x) denotes random variable X takes value x
• Probability of random variable X having x value is
denoted by P(X=x)
• P(X=x) can also be written as f(x):probability functions.

SQQS1043 Statistics and Probability 6


Definition

Def.1.1: If S is a sample space with a probability measure


and X is a real-valued function defined over the elements S,
then X is called a random variable.

• A random variable that assumes countable values is called a


discrete random variable.
• Example of discrete random variables:
• Number of houses sold by a developer in a given month.
• Number of cars rented at a rental shop during a given month.
• Number of reports received at the police station on a given day.
• Number of fish caught on a fishing trip.

SQQS1043 Statistics and Probability 7


Definition

Def.1.2: If X is a discrete random variable, the function


given by f(x)= P(X=x) for each x within the range of X is
called the probability distribution of X

SQQS1043 Statistics and Probability 8


Probability Functions & Distribution

• Probabilities associated with the values of a random variables X


can be displayed in three ways:
i. probability distributions table
ii. graph
iii. formula
• use formula to express the probabilities by means of a
function such that its values, f(x) for each x within the
range of the random variable X

SQQS1043 Statistics and Probability 9


Probability Functions & Distribution
=> Prob. Dist. Table
Table 1: Equivalent of events X & actual events
Values of X Equivalent Probability of X
events
(X=2) {HH} P(X=2)=P(HH)=
(X=2) {HH}
(X=1) {HT}or {TH} P(X=1)=P(HT)+P(TH)= ¼ + ¼ = ½
(X=1) {HT}or {TH} P(X=1)=P(HT)+P(TH)= ¼ + ¼ = ½
(X=0) {TT} P(X=0)=P(TT)=
(X=0) {TT}

Table 2: Probability Distribution Table of X


X 0 1 2 Total
P(X=x) = f(x) ¼ ½ ¼ 1
10
SQQS1043 Statistics and Probability
Probability Functions & Distribution
=> via Graph
Table 2: Probability Distribution of X
X 0 1 2 total

P(X=x) = f(x) ¼ ½ ¼ 1

f(x)

¼
x
0 1 2 11
SQQS1043 Statistics and Probability
Probability Functions & Distribution
=> via Formula
•Example
  1:
• let X be an event of getting heads when a coin is tossed twice. The
probability function f(x) can be written as:

• It’s probability can be easily verified by substitution.

SQQS1043 Statistics and Probability 12


Probability Rules
for Discrete Distribution

•Theorem
  1.1
A function can serve as the probability distribution of a discrete
random variable X if and only if its values, f(x)= P(X=x) satisfy the
conditions:
• for all values of X, the probability value f(x)= P(X=x) is fraction
between 0 and 1 (inclusive)

• for all values of X, the total probabilities are equal to 1

SQQS1043 Statistics and Probability 13


Continuous Random Variable
A random variable that can assume any value contained in
one or more intervals is called a continuous random
variable.

A continuous random variable can assume any value over an


interval or intervals because the number of values contained
in any interval is infinite.

The possible number of values that a continuous random


variable can assume is also infinite.

SQQS1043 A191 14
Continue…
Example of continuous random variables:
The weight of a person.
The time taken to complete a 100 meter dash.
The duration of a battery.
The height of a building.

Def. 1.3: A random variable X will be defined to be


continuous random variable if its space or domain of X that
is x, contains infinite number of point element (usually
through measuring process).

SQQS1043 A191 15
Probability Density Functions
 
Def. 1.4: A function with values f(x), defined over the set of all real
numbers, is called a probability density function of the continuous
random variable X if and only if

for any real constants a and b with .

 Probability density functions are also referred to, more briefly,


as probability densities, density functions, densities or p.d.f.’s.

 In connection with continuous random variables, probabilities


are always associated with intervals and P(X = c) = 0 for any real
constant c.
SQQS1043 A191 16
Probability Density Functions

The probability density of continuous random variable has two


characteristics:
1) The probability that x assumes a value in any interval lies in the
range 0 to 1.

2) The total probability of all the (mutually exclusive) intervals within


which x can assume a value is 1.

SQQS1043 A191 17
Probability Density Functions
 
Theorem 1.2
If X is a continuous random variable and a and b are real
constants with , then

 Theorem 1.3
A function can serve as a probability density of a
continuous random variable X if its values, f(x), satisfy the
conditions

SQQS1043 A191 18
Probability Density Functions
•  Probability associated with the value of a continuous random
variables X can be displayed in two ways:

 Via formula

 Via graph

f(x)
1

0 1 x
19
SQQS1043 A191
Example 2
•If  X has the probability density

a) Find the value of k.


b) Find .

Solution:

SQQS1043 A191 20
Example 2(Cont.)
• 
Solution:

SQQS1043 A191 21
Distribution functions for Discrete random
variable
•  There are many problems in which it is of interest to know
the probability that the value of a random variable is less
than or equal to some real number x.

• The probability that X is less than or equal to some real


number x can be written as
• This function is called distribution function or the
cumulative distribution function of X.

SQQS1043 Statistics and Probability 22


Continue…

Def 1.5: If X is a discrete random variable, the function


given by
 
𝐹 (𝑥 )=𝑃 (𝑋 ≤ 𝑥)=∑ 𝑓 (𝑡)      for   −∞< 𝑥<∞
𝑡 ≤ 𝑥 probability distribution of X
where f(t) is the value of the
at t, is called the distribution function or the cumulative
distribution of X.

•  The values of F(x) must satisfy the conditions:


• The and
• If a < b, then for any real numbers a and b.

SQQS1043 Statistics and Probability 23


Continue…
•Example
  3:
• Find the distribution function of the random variable that has the
probability distribution

• Solutions:

X 1 2 3 4 5

f(x) 1 / 15 2 / 15 3 / 15 4 / 15 5 / 15

F(x) 1 / 15 3 / 15 6 / 15 10 / 15 15 / 15

SQQS1043 Statistics and Probability 24


• 
Example 3: cont’…
• The distribution function of the random X with probability function

is given by:

SQQS1043 Statistics and Probability 25


Distribution Functions for
Continuous random variable
•  As in the discrete case, there are many problems in which it is of
interest to know the probability that the value of a continuous
random variable X is less than or equal to some real number x.

 Def. 1.6: If X is a continuous random variable and the value of its


probability density at t is f(t), then the function given by

is called the distribution function or the cumulative distribution


function (cdf) of X.

 The values of F(x) must satisfy the conditions:


 and
 when a < b

SQQS1043 A191 26
Continue…
 
Theorem 1.4
If f(x) and F(x) are the values of the probability density and
the distribution function of X at x, then

for any real constants a and b with , and

where the derivative exists.

SQQS1043 A191 27
Example 4
•   the distribution function of the random variable X of Example 2
Find
and use it to reevaluate .

For ,

𝟑
𝐹 ( 𝑥 )= 𝒙 for 0< 𝑥 <1
{
 

0 𝑒𝑙𝑠𝑒𝑤h𝑒𝑟𝑒

SQQS1043 A191 28
Example 4 (Cont.)
• 

8750

SQQS1043 A191 29
Class Activity 1
1. A mutual fund salesperson has arranged to call on three
people tomorrow. Based on past experience the salesperson
knows that there is a 20% chance of closing a sale on each call.
a) Determine the probability distribution of the number of
sales the salesperson will make. Let X be the number of
sales the sales person will make.
b) What is the probability that the salesperson will make less
than two sales?
c) Thus, obtain the distribution function of the number of
sales the salesperson will make.

SQQS1043 Statistics and Probability 30


Class Activity 1
2. Five equally qualified students (Sarah, Amy, Rahman, Firdaus and
Shuan) have applied to serve as student representatives on the
campus housing committee. Sarah and Shuan live in the residence hall
and the other students live off-campus. A random sample of three
students is selected from the five applicants to serve in the
committee. Suppose a random variable X is defined as the number of
student committee members who live in the residence hall.

a) Draw the tree diagram and construct the probability distribution of X.


b) What is the probability that the committee has at least one student who
lives in the residence hall?
c) Based on the answer in (b), would you consider this event likely to
occur? Justify your answer.
d) What is the probability that exactly two students live off-campus?
Interpret.

SQQS1043 Statistics and Probability 31


Class Activity 1
3. A box contains 15 marbles of which 4 are blue, 3 are yellow
and the others are red. A random sample of three marbles is
taken. Let X denote the number of red marbles in the sample.
a) Draw a tree diagram and develop the probability
distribution of X.
b) Compute the probability that
i. Exactly one marble is red.
ii. At most two marbles are red.
iii.At least two marbles are not red.

SQQS1043 Statistics and Probability 32


Class Activity 1
•4.  An insurance company offers its policyholders a number of
different premium payment options. For a randomly selected
policy holder, let X = the number of months between successive
payments. The cdf of X is as follows: 

a) Determine the range of a. 


b) Compute .

SQQS1043 Statistics and Probability 33


Class Activity 1
•5.  The continuous random variable X takes value in the interval only with
probability density function . The graph of consist of the two lines
f(x)
segments shown in the figure.
a

x
1 2 3

a)Show that
b)Write down the probability density function of

6. A piecewise continuous random variable is defined by the function given


below:

a) Draw the area under the probability density function of X, and thus show that
the total area is equal to 1.
b) Obtain the distribution function of X
c) Use your answer in (b) to determine P(X>1.5)
SQQS1043 A191 34
Class Activity 1
•7.  The p.d.f. of the random variable X is given by

a) Find the value of c.


b) Find .
8. The distribution function of the random variable X is given by

c) Find
d) Find the probability density function of X and use it to reevaluate part (a).

SQQS1043 A201 35
Mathematical Expectation

SQQS1043 Probability and Statistics 36


Expected Value of X (Discrete Random Variable)

 
Def 1.7: If X is a discrete random variable, and f(x) is the
value of its probability distribution at x, the expected
value of X is given by

• The mathematical expectation of a random variable is the sum


of the products obtained by multiplying each value, x of the
random variable by its corresponding probability, f(x).

SQQS1043 Statistics and Probability 37


Example 4
•  Let a function of random variable X given by expression:

i. Obtain the value of constant k,


ii. Find expected value of X.
Solution:
iii. The value of k:

∑ 𝑓 (𝑥)=1
 
1 𝑘 +2 𝑘 +3 𝑘 +4 𝑘 +5 𝑘 =1
 

  1
15 𝑘 =1 ∴ 𝑘=
15
SQQS1043 Statistics and Probability 38
Example 4: cont’…
•ii.  The expected value of X

SQQS1043 Statistics and Probability 39


Expected Value related to X (Discrete
Random Variable)
• In many problems, we are not only interested in the expected
value of a random variable X
• Sometimes, we are also interested in the expected value of
random variables related to X

 
Theorem 1.5:
If X is a discrete random variable and f(x) is the value of
it’s probability distribution at x, the expected value of g(X)
is given by

SQQS1043 Statistics and Probability 40


Example 5
•  If X is the number of points rolled with a balanced die, find the
expected value of .
Solution:
With a balanced die, the probability of each outcome

SQQS1043 Statistics and Probability 41


Related Theorem
  Theorem 1.6:
If a and b are constants, then

where

SQQS1043 Statistics and Probability 42


Example 6

•Refer
  to example 5
• If X is the number of points rolled with a balanced die, find the
expected value of .
Solution using theorem 1.6:
With a balanced die,

 
 
+

SQQS1043 Statistics and Probability 43


Expected Value of X
(Continuous Random Variable)
 
Def. 1.8: If X is a continuous random variable and f(x) is the value of its
probability density at x, the expected value of X is

 As discrete variable, there are many problems in which we are


interested in the expected valued of random variables related to X.

 
Theorem 1.7
If X is a continuous random variable and f(x) is the value of its probability
density at x, the expected value of g(X) is given by

SQQS1043 A191 44
Example 7
•Let
  be a continuous random variable with probability density function
as below.

Find the expected value of this random variable.


Solution:

SQQS1043 A191 45
Example 8
•If  X has the probability density

Find the expected value of .


Solution:

=4

SQQS1043 A191 46
Moments &
Moment Generating Function

SQQS1043 Probability and Statistics 47


Moments
• Originated from the field of Physics

 
Def.1.9: The rth moment about the origin of a random
variable X is denoted by , is the expected value of

 
Def.1.10: is called the mean of the distribution of X or
simply the mean of X. It is simply denoted by

SQQS1043 Statistics and Probability 48


Moments
 

Def.1.11: The rth moment about the mean of a random


variable X is denoted by , is the expected value of

Def.1.12: is called the variance of the distribution of X or


simply the variance of X. It is denoted by

SQQS1043 Statistics and Probability 49


Moments

 Theorem 1.8:
The variance of the distribution of X can also be
obtained through the use of the 1st and the 2nd moment
of origin.

Proof:

SQQS1043 Statistics and Probability 50


Related Theorem

 
Theorem 1.9:
If X has the variance , then

SQQS1043 Statistics and Probability 51


•Example
  9:
• Calculate the mean and the variance of X, where X is the
number of points rolled with a balanced die
• Solution:
i. Mean is the 1st moment of origin

= 3.5

SQQS1043 Statistics and Probability 52


•Example
  9: cont’…
• Calculate the mean and the variance of X, where X is the
number of points rolled with a balanced die
• Solution:
ii. Variance is the 2nd moment of the mean or can be obtained
using theorem 1.4

E(X) = E(X2) - [ E(X) ]2


= 2.9167

SQQS1043 Statistics and Probability 53


•Note:
 
• From definition 1.9 and 1.10, we can write the mean of X using
expected value of X.

• In theorem 1.4, we know that


• The formulation of above variance, can also be written using
expected value of X:

SQQS1043 Statistics and Probability 54


Moment
 
Def. 1.13: The rth moment about the origin of a continuous random
variable X, denoted by , is the expected value of , symbolically

 
Def. 1.14: The rth moment about the mean of a continuous random
variable X, denoted by , is the expected value of , symbolically

SQQS1043 A191 55
Example 10
•Refer
  back to Example 7, find the mean and standard deviation of the
random variable X.
Solution:

Recall…
In Example 7, we showed that .
mean = .

Standard deviation, =

SQQS1043 A191 56
Example 10 (Cont.)
• 

= 0.05
Therefore, the standard deviation is

SQQS1043 A191 57
Moments Generating Functions

• An alternative procedure for determining moments

 
Def.1.10: The moment generating function of a random
variable X where it exists, is given by

SQQS1043 Statistics and Probability 58


Related Theorem
  Theorem 1.11:
If a and b are constants, then E(ext) + E(eat)

E(et/b(X)) + E(ea/b(t))

  Theorem 1.12:

59
SQQS1043 Statistics and Probability
•Example
  11:
• Given that X has the probability distribution

X 0 1 2 3
P(X=x) 1/8 3/8 3/8 1/8

Find the moment generating function of this random variable,


and use it to determine
Solution:
The moment generating function is given by

SQQS1043 Statistics and Probability 60


•  Example 11: cont’…
• By theorem 1.12:

SQQS1043 Statistics and Probability 61


Moment Generating Functions

Def. 1.15: The moment generating function of a continuous


random variable X, where it exists, is given by

SQQS1043 A191 62
Example 12
 Find the moment generating function of the random variable whose
probability density function is given by

  and use the moment generating function, find mean and variance.
Solution:
 

63
Example 12 (Cont.)
• 

Therefore, the variance is

64
SQQS1043 A191
Factorial Moment Generating
Function

SQQS1043 Probability and Statistics 65


Factorial Moment Generating Function
•  An easier way of determining the moments.
• If X is a discrete random variable taking values only in the set
{0,1, ...} of non-negative integers, then it  is also
called probability-generating function of X
• The factorial moment generating function is given by

• The rth derivative of with respect to t at t =1 is


• The rth factorial moment of X is given by

SQQS1043 Statistics and Probability 66


Factorial Moment Generating Function
•  Since the rth factorial moment of X is given by

Theorem 1.13
Let X be a random variable with factorial moment generating
function . Then

Corollary
Let X be a random variable. Then

SQQS1043 Statistics and Probability 67


Factorial Moment Generating Function

 Theorem 1.14:

Let X be a discrete random variable. Then,

SQQS1043 Statistics and Probability 68


•Example
  8
Consider the random variable X with the probability distribution
function given by

Determine the factorial moment generating function of X, mean


and variance.
Solution:


 

SQQS1043 Statistics and Probability 69


•Solution
  cont’…

The first derivative:


;
The second derivative:
;
Therefore:

SQQS1043 Statistics and Probability 70


Class Activity 1
•1.  If X1, X2 and X3 are independent and have the means 4, 9 and 3 and
the variances 3, 7 and 5 respectively; find the mean and the
variance of
a. Y = 2X1 – 3X2 + 4X3 Answer: E(X) = -7 & Var(Y) = 29
b. Z = X1 + 2X2 – X3 Answer: E(Z) = 19 & Var(Z) = 26

2. Find for the random variable X that has the probability distribution

=4

SQQS1043 Statistics and Probability 71


Class Activity 2
•1.  The probability distribution function of the age of babies, x years
being brought to a postnatal clinic is given by

 
a) Find the mean of age of babies being brought to a postnatal clinic.
Answer: E(X) = 1

b) If one baby is selected at random from the post natal clinic,


what is the probability that the baby is under 8 months old? 
Answer: P (X < 8 months) = 0.2593

c) If 60 babies are brought in on a particular day, how many are


expected to be under 8 months old?
Answer: P (X < 2/3) = 16 babies

SQQS1043 A191 72
Class Activity 2
• 
2. Find the moment-generating function of the continuous variable X
whose probability density is

and use it to find mean and standard deviation.

Answer: - 1 ) / t

3. Given the moment-generating function , find the moment-


generating function of the random variable , and use it to determine
the mean and the variance of Z.

Answer:

73
Class Activity 2
•4.  Find the moment generating function of the distribution
random variable X that has the probability distribution

and use it to determine the values of

++
= 1.3333
= 2.2222

SQQS1043 Statistics and Probability


74
5. Consider the random variable X with a factorial
moment generating function given by
FX(t) = (0.3 + 0.7t)10.
i. Compute the mean of X .
ii. Compute the variance of X.
iii. Compute P(X = 2).

SQQS1043 Probability and Statistics 75

You might also like