Transcript Topic 9x
Topic 9
Probability
• The probability that an event does not occur is 1 minus the
probability that the event does occur (complement)
P(Ac) = 1 – P(A)
• {AB} “A union B”
The set of all outcomes that are either in A or B
• {AB} “A intersect B”
The set of all outcomes that are in both A and B
• “empty set”
If two sets are disjoint (mutually exclusive) then AB =
• If two events have no outcomes in common (disjoint aka
mutually exclusive), the probability that one or the other
occurs is the sum of their individual probabilities
P(A or B) = P(A) + P(B)
(addition rule)
• If two events are not mutually exclusive, then
P(A B) = P(A) + P(B) – P(A B) (addition rule)
Independent Events
• If knowing one occurs done not change the
probability that the other occurs, the two events
A and B are Independent.
• Two events A and B are independent if knowing
that one occurs does not change the probability
that the other occurs
• If A and B are independent,
P(A and B) = P(A)P(B)
Or
P(A|B) = P(A)
Conditional Probability
When P(A)>0, the conditional probability of B
given A is:
P ( A and B )
P ( BA)
P ( A)
Tree diagrams combine the addition and multiplication
rules
The probability of reaching the end of any complete
branch is the product of the probabilities written on its
segments
There are two types of random variables:
– Discrete random variables can take one of a countable number
of distinct outcomes.
• Example: Number of credit hours, amount of people at an
event
– Continuous random variables can take any numeric value
within a range of values.
• Example: Cost of books this term, daily temperature
• The probability distribution of X lists the values and their
probabilities.
Value of X: x1, x2, x3, … , xk
Probability: p1, p2 , p3 , … , pk
• To find the probability of event pi , add up the probabilities of the
xi that make up that event.
You pick a 3 digit number. If your number is chosen
you win $500. There are 1000, 3 digit numbers.
Each pick costs $1.
Taking X to be the amount your ticket pays
you, the probability distribution is:
Payoff X:
$0
$500
Probability:
0.999
0.001
The Expected winnings/earnings (weighted average) is:
= 500(1/1000) + 0(999/1000) = $ 0.50
Conclusion: In the long run, the state keeps ½ of what
you wager.
• Mean (Expected Value)
To find mean of X, multiply each possible value by
its probability then add all of the products.
X x1 p1 x2 p2 ... xk pk
X xi pi
• Variance
Variance and standard deviation are measures of
spread
x1 X p1 x2 X p2 ... xk X pk
2
X
2
2
xi X pi
2
X
2
2
Binomial Distribution
•
•
•
•
We put things into two categories, success or failure.
There is a fixed number of observations, n
All observation are independent
The probability of success is the same for each
observation.
• All four conditions must be met to have a binomial
setting.
• Binompdf(n,p,X): use this for exactly X successes
• Binomcdf(n,p,X): calculates the sum of the
probabilities for 0,1,2 up to the value X. This
calculates the probability of obtaining at most X
successes in n trials.
Binomial coefficient:
n k
nk
P X k p 1 p
k
Mean (Expected value) and Standard Deviations
np
np(1 p)
Suppose there are 10 restaurants in Waxhaw that are
considering using Mrs. Richardson’s homemade
awesome spaghetti sauce. The probability that they
use her sauce is 20%.
a) What is the probability of finding up to 4
restaurants that use only the best sauce (that would
be mine)?
P(x<4) = binomcdf (10, 0.2, 4) = 0.9672
b) What is the probability that exactly 2 of the 10
restaurants use Mrs. R’s sauce?
P(x=2) = binompdf (10, 0.2, 2) = 0.302
c) What is the probability that at least 5 of the 10
restaurants carry Mrs. R’s sauce?
P(x>5) = 1 – P(X<4)= 1 - binomcdf (10, 0.2, 4) = 0.0328
Geometric Distribution
• The goal of Geometric distributions is to obtain a fixed
number of successes.
• A random variable X can be defined that counts the
number of trials needed to obtain that first success.
• Each observation must fall into either success or failure
• The probability of success is the same for each
observation
• All observations are independent
• The variable of interest is the number of trials required
to obtain the first success
• Difference in Binomial and Geometric: Binomial starts
with 0 and Geometric starts with 1
• P(X=n) = (1-p)n-1p
• A probability distribution for a geometric
random variable never ends
• Mean:
1
p
Let’s say Henry VIII’s prob of having a girl was .6
• What is the probability that the first son is the
fourth child born?
P(X=4) = 0.6*0.6*0.6*0.4=
geometpdf (0.4, 4) =
• What is the probability that the first son born is at
most the fourth child?
P(X<4) = geometcdf (0.4, 4) =
• What is the probability that the first son born is at
least the third child?
P(X>3) = 1 - geometcdf (0.4, 2) =
• A real estate agent shows a house to
prospective buyers. The probability that the
house will be sold to the person is 35%. What
is the probability that the agent will sell the
house to the third person she shows it to?
P(X=3) = (1-0.35)*(1-0.35)*0.35 =
geometpdf (0.35, 3) = 0.1479
• How many prospective buyers does she
expect to show the house to before someone
buys the house?
1
𝜇𝑋 =
= 2.86 𝑏𝑢𝑦𝑒𝑟𝑠
0.35