MATHS2003 Profit, Loss and Gambling: Bayes' Rule Basic Statistics Probability Distributions

You might also like

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

MATHS2003 Profit, Loss and Gambling

Bayes’ Rule
Basic Statistics
Probability Distributions
Commonwealth of Australia Copyright Act 1968
Notice for paragraph 135ZXA (a) of the Copyright Act 1968
Warning
This Material has been reproduced and communicated to you by or on behalf of Federation University Australia
under Part VB of the Copyright Act 1968 (the Act).
The Material in this communication may be subject to copyright under the Act. Any further reproduction or
communication of this material by you may be the subject of copyright protection under the Act.
Do not remove this notice.
Week 2 Homework
Overview (last week)
Probability
Event composition
• Sum rule
• Multiplicative rule
Overview (this week)
Bayes’ Rule
Basic Statistics
• Measures of central location
• Measures of variability
Probability Distributions
• Random variables
• Expected value
• Standard deviation
Bayes’ Rule

CRICOSCRICOS Provider
Provider No.No. 00103D
00103D
Example
Three bowls
• Bowl B1 contains 2 red and 4 white chips
• Bowl B2 contains 1 red and 2 white chips
• Bowl B3 contains 5 red and 4 white chips
The probabilities for selecting the bowls:
• P(B1)=1/3, P(B2)=1/6, P(B3)=1/2

The experiment consists of selecting a bowl and then


drawing a chip from that bowl
What is the probability of event R (red)
Law of Total Probability
Given a set of events B1, B2, …, Bk that are mutually
exclusive and exhaustive and an event A, the probability of
an event A can be expressed as:

P(A) = P(B1)P(A|B1) + P(B2)P(A|B2) + … + P(Bk)P(A|Bk)


Example
Three bowls
• Bowl B1 contains 2 red and 4 white chips
• Bowl B2 contains 1 red and 2 white chips
• Bowl B3 contains 5 red and 4 white chips
The probabilities for selecting the bowls:
• P(B1)=1/3, P(B2)=1/6, P(B3)=1/2

The experiment consists of selecting a bowl and then


drawing a chip from that bowl
Suppose that the outcome is a red chip. What is the
probability that it came from B1?
Bayes’ Rule
The conditional probability of an event Bi, given that an event
A has occurred

P ( A  B )  P ( A)  P ( B | A)  P ( B )  P ( A | B )
P( B) P( A | B)
P ( B | A) 
P ( A)

P ( Bi ) P( A | Bi )
P ( Bi | A) 
P ( A)
Example
Suppose that the outcome is a red chip
• What is the probability that it came from B1?
• What is the probability that it came from B2?
• What is the probability that it came from B3?
Example
Medical case histories indicate that different illnesses may
produce identical symptoms. Suppose a particular set of
symptoms, which we will denote as event H, occurs only
when any one of three illnesses A, B, or C occurs. Studies
show these probabilities of getting the three illnesses:
P(A) = 0.01; P(B) = 0.005; P(C) = 0.02
The probabilities of developing the symptoms H, given a
specific illness, are:
P(H|A) = 0.90; P(H|B) = 0.95; P(H|C) = 0.75
Assuming a person shows the symptoms H, what is the
probability that the person has illness A?
Example
In a certain factory, machines I, II and III are all producing
wires of the same length
Of their production, machines I, II and III produce 2%, 1%
and 3% defective wires, respectively
Of the total wire production, machine I produces 35%,
machine II produces 25%, and machine III produces 40%
• If one wire is randomly selected, what is the probability that it is
defective?
• If the wire is defective, what is the probability that it was produced
by machine III?
Basic Statistics

CRICOSCRICOS Provider
Provider No.No. 00103D
00103D
Measures of Central Location
Mean
• most popular measure
• commonly referred to as the average
• sum of values divided by number of measurements

n N

x i x i
x i 1
 i 1

n N
Mean
Example 1
• The number of hours that 6 students watched television
during an exam week are shown below:
10, 15, 24, 6, 18, 10
Determine the mean number of hours these students
spent watching television
Measures of Central Location
Median
• Value that falls in the middle when measurements are
arranged in order of magnitude
• Symbol m
• It will be the (n+1)/2 term
• average two numbers if n is even
Median
Example 2
• The number of typing mistakes per page from 5
secretaries follow:
3, 6, 15, 2, 0
Find the median number of mistakes per page
• Find the median for the following set of numbers:
2, 5, 6, 9, 11, 27
Measures of Central Location
Mode
• Value that occurs most frequently
• If there are 2 modes then the distribution is said to be
bimodal

• Find the mode for the number of hours spent watching


television
10, 15, 24, 6, 18, 10
Measures of Variability
Measures of central tendency do not tell the whole story
about a distribution of measurements
Consider the average monthly rainfall in 2 areas

A: 35 45 22 15 2 4 6 2 4 4 20 21
B: 15 16 15 15 13 12 15 16 16 16 15 16

• Determine mean for both areas


• Which area would you choose for a farm that needs constant
watering?
Measures of Variability
Range
• numerical difference between largest and smallest
measurements
Variance n

 (x  x )
i
2

s 
2 i 1

n
• most widely accepted measure of variability of a set of
data
• takes into account each measurement
Measures of Variability
Standard Deviation

 (x  x )
i
2

s i 1

n
• Has units that are the same as the original data
Interpreting Standard Deviation
If income of a company’s employees has a mean of $45,000
and standard deviation of $5,000, what does it tell us about
the spread of the data?
It would be more meaningful if we could determine the % of
measurements that fall within a specified range
Empirical Rule
If a sample of measurements has a mound-shaped
distribution (bell-shaped), the interval:

( x  s, x  s )contains 68% of measurements

( x  2 s, x  2contains
s) 95% of measurements

( x  3s, x  3contains
s) virtually all measurements
Example
Telephone-call durations have been recorded for a company.
The calls have a mean of 10.2 and standard deviation of 4.5
minutes
• If the distribution is bell-shaped, 95% of the calls lie in
what interval?
Example
It is known that the average income of 1000 employees has
a mound-shaped distribution with an average of $45,000 and
standard deviation of $5,000. How many employees would
you expect to earn between:
a. $40,000 - $50,000
b. $35,000 - $55,000
c. $30,000 - $60,000
Probability
Distributions

CRICOSCRICOS Provider
Provider No.No. 00103D
00103D
Variables
Qualitative (categorical) variables
– places an experimental unit into one of several groups
Quantitative (numerical) variables
• Measures a numerical quantity on each experimental
unit
• Discrete or continuous
GS#
Nea Employee Information
A J
agnolK
medbai
eerd Name Age Gender Job Salary # Kids
rys
FM Sam 39 Female Manag. 62100 2
ea6
S3mn2
a9aa12 Bert 27 Male Techn. 47350 4
m0
lg0
e. Eve 22 Female Cleric. 18250 0
T4
BM e7 Fred 48 Male Manag. 77600 2
e2ac
r7lh34
ten5
.0
Random Variables
A variable X is a random variable if the value that it assumes
is as a result of a random event
Egs
• number of accidents on a strip of road
• number of calls in a time period
• amount won in a roulette spin
Discrete random variable
• Only a finite or countable number of values
Probability Distribution
Probability distribution for a random variable X is a formula,
table or graph that provides the probability p(x) associated
with each of the values of x
• Requirements:

0  p( x)  1  p( x)  1
Probability density function (pdf)
Examples
Toss two fair coins and let X be equal to the number of
heads observed
• Find the probability distribution for X

Roll a 4-sided die twice and let X equal the larger of the two
outcomes
• Write down the probability distribution for this
experiment
Distribution Function
Instead of considering events such as {X=x} and the
corresponding probabilities P(X=x), one can consider the
probabilities P(X≤x)
The function F(x) = P(X≤x) is known as the distribution
function

Example:
Let the pdf of X be defined by p(x) = x/9, x = 2,3,4
Determine the distribution function and sketch its graph
Expected Value
Value that you would expect to observe on average if the
experiment is repeated over and over again
n
  E ( X )   xi p( xi )
i 1

Ex. Consider the probability distribution again for the number


of heads from two tosses of a coin. Suppose the experiment
is repeated a large number of times
How many heads would you expect to get on average?
Spread
Variance measures the spread or variability of the random
variable

 2   ( x   ) 2 p ( x)  E ( X 2 )   2

  ( x 2  2  x   2 ) p( x)

  x 2 p ( x)  2   xp ( x)   2  p ( x)

  x 2 p( x)  2 2   2   x 2 p ( x )   2
Spread
Standard deviation is equal to the square root of the
variance

  ( x   ) 2
p( x)

  x 2
p ( x )   2
Example
Consider a dice game in which the player rolls a die
If any number from 1 through 5 is rolled, the player receives
a return of $3
If a six is rolled, the return is $15
• Write down the probability distribution
• What is the expected return?
• What is the variance of the probability distribution?
• What is the standard deviation?
Overview
Bayes’ Rule
Basic Statistics
• Measures of central location
• Measures of variability
Probability Distributions
• Random variables
• Expected value
• Standard deviation

You might also like