0% found this document useful (0 votes)
20 views

Lecture 06

The document discusses key concepts in probability and statistics including random variables, probability distributions, mean, standard deviation, and expectation values. It provides examples of discrete and continuous random variables and how to calculate their probability distributions, mean, and standard deviation. Key formulas and properties are defined.

Uploaded by

mythemyaseen6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Lecture 06

The document discusses key concepts in probability and statistics including random variables, probability distributions, mean, standard deviation, and expectation values. It provides examples of discrete and continuous random variables and how to calculate their probability distributions, mean, and standard deviation. Key formulas and properties are defined.

Uploaded by

mythemyaseen6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

MAT3026 - Probability and Statistics

Lecture 6 – The Random Variable


and Expectation Values
§ The Random Variable Walpole Section 3.1
§ Discrete Probability Distributions Walpole Section 3.2
§ Continuous Probability Distributions Walpole Section 3.3
§ Mean of a Random Variable Walpole Section 4.1
§ Standard Deviation (Variance) Walpole Section 4.2

MAT3026 Lecture 6 1
The Random Variable
A random variable X is a function that assigns to every element in the sample
space S a number representing the outcome of a random process.
We are interested in the range of values of X and their probabilities. Here, It is
important to make the distinction between a random process that has
outcomes in discrete space and one that has outcomes in continuous space.

outcomes outcomes

x x
Discrete space; the number of Continuous space; the number of
outcomes in this is space is countable. outcomes in this space is uncountable.

Note that x is a particular value in the collection X.


MAT3026 Lecture 5 2
Example
The position at which a spinning bottle comes to rest on a smooth surface can
be considered to be random.
Random variable X represents Random variable X represents
the angle at which the bottle the quadrant in which the bottle
points when it stops. points when it stops.

Q2 Q1
x

Q3 Q4
Any value continuous discrete
between 0 outcomes outcomes
and 360o
x (degrees) x (quadrant)
0 360 1 2 3 4

MAT3026 Lecture 5 3
The Probablity Distribution
Definition: If X is a discrete random variable, the function given by f (x) = P(X=x)
for each x in the range of X is called the probability distribution of X.

If X is discrete then is called If X is continuous then is called


the probability mass function (pmf). the probability density function (pdf).

pmf pdf

represents probability represents probability density

MAT3026 Lecture 5 4
Basic Properties of the pmf Example of a discrete random
variable with three alternative
forms of expressing the pmf.
describes the probability for each outcome
x, and therefore must be positive.

x 1 2 3 4
The random variable covers all possible outcomes f (x) 0.3 0.4 0.1 0.2
and so the total probability is 1.

We can extract the probability of a range of


outcomes by simply summing over their
individual probabilities (each outcome is disjoint).

MAT3026 Lecture 5 5
Basic Properties of the pdf
The probability density function (pdf) pdf
for a continuous random variable has
the following properties:

A probability cannot be negative.

The random variable covers all


possible outcomes and so the total
probability is 1.

We can extract the probability of a


range of outcomes by simply
integrating over probability densities.

MAT3026 Lecture 5 6
Example (discrete)
For the experiment of tossing a coin three times, find
the probability distribution for the random variable X
representing the number of heads in the outcome.

Sample Number X 0 1 2 3
space of heads Probability
f (x) 1/8 3/8 3/8 1/8 sum= 1
HHH 3 1/8
HHT 2 1/8
f (x) pmf
HTH 2 1/8
3/8 3/8
HTT 1 1/8
THH 2 1/8
1/8 1/8
THT 1 1/8
TTH 1 1/8 x, number
TTT 0 1/8
0 1 2 3 of heads

8 outcomes, all equally likely


MAT3026 Lecture 5 7
Example (continuous)
For the probability density function given below, investigate its basic properties,
and calculate the probability that the outcome of the random process is
between 0.25 and 0.75.

Solution
1. 
pdf
2. 

Yes, “half of the area under


the curve” looks correct. 

MAT3026 Lecture 5 8
Expectation Values
Expectation values are mathematical objects that summarize a distribution
in the form of a few descriptive values (descriptive statistics).

In this course we focus on two objects: mode median mean


1. The mean, X
This is a measure of the center of
the distribution (the center of mass).
2. The standard deviation, X
This is a measure of how much the
distribution is spread about the mean.

See also skewness and kurtosis


(not covered in this course).

MAT3026 Lecture 5 9
Examples of the mean  and standard deviation 
(we will learn how to calculate  and  later).

 = 1.67
 = 0.24

 

Estimation

MAT3026 Lecture 5 10
Estimation

Examples
Estimate  and  for the following pdfs

 = 4.17,
 = 5.00,  = 1.86
 = 2.89

MAT3026 Lecture 5 11
Definition: mean, 
Let X be a random variable with probability distribution f (x).
The mean of X is

if X is a discrete random variable

if X is a continuous random variable

This is a measure of the location of the distribution (the center of mass).

MAT3026 Lecture 5 12
The expectation of the function g(X) is:

if X is discrete

if X is continuous

Simply replace x with g(x)

Some properties

a, b, n are constants

This approximation
improves as   0

MAT3026 Lecture 5 13
Example (discrete)
What is the mean number of heads obtained when three coins are tossed?

Solution f (x)
Results from an earlier today
X 0 1 2 3
f (x) 1/8 3/8 3/8 1/8
x
0 1 2 3
E(X)
= 01/8 + 13/8 + 23/8 + 31/8 = 1.5 Note that in this case, since  is
the center of mass we can
The mean outcome of the random directly say, “by symmetry the
process is 1.5 heads. mean is 1.5”

MAT3026 Lecture 5 14
Example: A factory produces circular metal discs with various diameters X (cm)
with the probabilities P given below:
a) Calculate the average
diameter of the discs.
b) Calculate the average area
of the discs.

Solution x
with x = the disc diameter
E[X] = 4(1/12) + 5(1/12) + 6(1/4) + 7(1/4) + 8(1/6) + 9(1/6)
= 41/6 = 6.8333  6.8 cm.
Cross-check this result with an
estimate from a sketch of the pmf.

MAT3026 Lecture 5 15
Example: A factory produces circular metal discs with various diameters X (cm)
with the probabilities P given below:
a) Calculate the average
diameter of the discs.
b) Calculate the average area
of the discs.

Solution area =  r 2 x
E[area] = E[ X 2/ 4] =  x2/ 4
= (/4) E[X 2]
= (/4) [ 421/12 + 521/12 + 621/4 + 721/4 + 821/6 + 921/6 ]
= (/4) 48.8333’ = 38.3536  38.4 cm2.

Estimate: similar 
(/4) E[X 2]  (/4) E[X]2 = (/4) (41/6)2 = 36.7 cm2 Note that E[X]2  E[X2]

MAT3026 Lecture 5 16
Example (continuous)
The diameter, x, in cm of a sample of steel spheres can be considered to be a
uniform continuous random variable of the form: f (x) = k for 5 < X < 7 cm.
a) Sketch the pdf and determine the value of k for this pdf.
b) Determine the mean diameter of the steel spheres.
c) Calculate the mean volume of the steel spheres.

a)

b)

MAT3026 Lecture 5 17
The diameter, x, in cm of a sample of steel spheres can be considered to be a
uniform continuous random variable of the form: f (x) = k for 5 < X < 7 cm.
a) Sketch the pdf and determine the value of k for this pdf.
b) Determine the mean diameter of the steel spheres.
c) Calculate the mean volume of the steel spheres.

c)

Estimate: E[V]

MAT3026 Lecture 5 18
Variance and Standard Deviation
The variance ( 2) of a random variable X is defined by:
discrete

continuous
This is a measure of by how much the distributution varies about the mean value.

This is generally
easier to calculate
The standard deviation is then

Property:

MAT3026 Lecture 5 19
Example: The power (GWatts) generated by a tidal
power station is a continuous random variable X
having the probability density shown right.
Find the mean and standard deviation of X.

Solution
First, sketch and estimate: 1.7  0.25
 1.67


We can describe the distribution in a more
 simple way, as: Power = 1.67  0.24 GW

MAT3026 Lecture 5 20
Example:
In a computer game, a virtual first aid kit provides a random
healing value, H, to a player represented by the following
probability density function:
a) Show that this is a valid pdf.
b) Calculate the average healing value.
c) Calculate the standard deviation of the healing value.
d) What is the average and standard deviation of 100 H ?
Solution
First sketch and estimate the mean and s.d.
  0.8, 2 covering about two-thirds of the
distribution    0.2

a)
Total probability = 1

MAT3026 Lecture 5 21
b) Calculate the average healing value.
Average = mean = E[H]

c) Calculate the standard deviation of the healing value.


  0.8
  0.2

d) What is the average and standard deviation of 100 H ?

MAT3026 Lecture 5 22
Homework
1. Reviewing today’s lecture notes
they can be found on the course website.
2. Reading - read Walpole Sections 3.1, 3.2, 3.3, 4.1, 4.2
3. Exercises - can be found on the course website.

MAT3026 Lecture 5 23

You might also like