Professional Documents
Culture Documents
AP ECON 2500 Session 3
AP ECON 2500 Session 3
Lee
Department of Economics York University
Topic 2: Probability and Topic 3: Random Variables and Probability Distribution
Reading: Chapters 3 and 4
Review of Week 2:
#2.57a: 4, 2, 1, 0, 1: Range = 4-0 = 4, ∑ 𝑥 2 = 22, 𝑥̅ = 1.6, 𝑠 2 = 2.3, 𝑠 = 1.52
#2,58a: n = 10, ∑ 𝑥 2 = 84, ∑ 𝑥 = 20: 𝑠 2 = 4.89, 𝑠 = 2.211
#2.74:
Data: 7, 6, 6, 11, 8, 9, 11, 9, 10, 8, 7, 7, 5, 9, 10, 7, 7, 7, 7, 9, 12, 10, 10, 8, 6
40−30
#2.90a: x = 40, s = 5, 𝑥̅ = 30, ==> 𝑧 = 5
=2
Page 1 of 29
#2.108
2.110
I just choose the first row only and arrange it with the ascending order.
Order 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
data 83 84 85 87 89 91 91 92 92 92 94 95 97 99 100
Variable 1 Variable 2
5 14
3 3
-1 10
2 1
7 8
6 5
4 3
0 2
8 12
Page 2 of 29
Probability: Chapter 3
Contents
1. Events, Sample Spaces, and Probability
2. Unions and Intersections
3. Complementary Events
4. The Additive Rule and Mutually Exclusive Events
5. Conditional Probability
6. The Multiplicative Rule and Independent Events
7. Bayes’s Rule
Learning Objectives
1. Develop probability as a measure of uncertainty
2. Introduce basic rules for finding probabilities
3. Use probability as a measure of reliability for an inference
4. Provide an advanced rule for finding probabilities
Thinking Challenge
• What’s the probability of getting a head on the toss of a single fair coin? Use a scale from 0 (no
way) to 1 (sure thing).
• So toss a coin twice. Do it! Did you get one head & one tail? What’s it all mean?
• Many repetitions: what could be the possible outcome?
Example:
• The probability of heads is 0.5 = the proportion of times you get heads in many repeated trials.
Page 3 of 29
3.1 Events, Sample Spaces, and Probability
• Experiment: Process of observation that leads to a single outcome that cannot be predicted
• with certainty
• Sample point: Most basic outcome of an experiment
• Sample space (S): Collection of all sample points
Sample Spaces
• The sample space S of a chance process is the set of all possible outcomes.
• An event is an outcome or a set of outcomes of a random phenomenon. That is, an event is a
subset of the sample space.
• A probability model is a description of some chance process that consists of two parts: a
Events
• Specific collection of sample points
• Simple Event: Contains only one sample point
• Compound Event: Contains two or more sample points
Event Examples
• Experiment: Toss 2 Coins. Note Faces.
• Sample Space: HH, HT, TH, TT
Event Outcomes in Event
1 Head & 1 Tail HT, TH
Head on 1st Coin HH, HT
At Least 1 Head HH, HT, TH
Heads on Both HH
Page 4 of 29
Example 3.1
• Consider flipping a coin twice.
• What is the probability of getting two heads?
• Sample Space: HH HT TH TT
• So, P(two heads) = P(HH) = ¼
Probabilities
What is Probability?
• Numerical measure of the likelihood that event will occur:
P(Event), P(A), Prob(A)
• Lies between 0 & 1
• Sum of sample points is 1
Steps for Calculating Probability
• Define the experiment; describe the process used to make an observation and the type of
observation that will be recorded.
• List the sample points.
• Assign probabilities to the sample points.
• Determine the collection of sample points contained in the event of interest.
• Sum the sample points probabilities to get the event probability.
Example:
• Give a probability model for the chance process of rolling two fair, six-sided dice―one that’s
red and one that’s green.
Page 5 of 29
• Sample Space: 36 Outcomes
• Since the dice are fair, each outcome is equally likely.
• Each outcome has probability 1/36.
Example
• A probability for each possible event in the sample space S.
Example: Probability Model for a Coin Toss:
S = {Head, Tail}
Probability of heads = 0.5
Probability of tails = 0.5
Example
• Sample space for the number of heads in tossing a coin 4 times
• S = {0, 1, 2, 3, 4}
Example
• Sample space for having exactly 2 heads in tossing a coin 4 times
• S = {TTHH, THTH, THHT, HTTH, HTHT, HHTT}
Example:
• A basketball player shoots three free throws. What are the possible sequences of hits (H) and
misses (M)?
H - HHH
H M - HHM
H
M H - HMH
M - HMM
M…
…
S = { HHH, HHM, HMH, HMM, MHH, MHM, MMH, MMM }: Note: 8 elements, 23
Page 6 of 29
Probability Rules
1. Any probability is a number between 0 and 1.
2. All possible outcomes together must have probability 1.
3. If two events have no outcomes in common, the probability that one or the other occurs is the
sum of their individual probabilities.
4. The probability that an event does not occur is 1 minus the probability that the event does
occur.
• Rule 1. The probability P(A) of any event A satisfies 0 ≤ P(A) ≤ 1.
• Rule 2. If S is the sample space in a probability model, then P(S) = 1.
• Rule 3. If A and B are disjoint, P(A or B) = P(A) + P(B). This is the addition rule for disjoint events.
• Rule 4: The complement of any event A is the event that A does not occur, written AC.
P(AC) = 1 – P(A).
Example:
• Distance-learning courses are rapidly gaining popularity among college students. Randomly
select an undergraduate student who is taking distance-learning courses for credit and record
the student’s age. Here is the probability model:
Page 7 of 29
Example 3.5
Page 8 of 29
3.2 Unions and Intersections.
Compound events:
• Composition of two or more other events.
• Can be formed in two different ways.
Unions & Intersections
• Union: Outcomes in either events A or B or both
‘OR’ statement
Denoted by ∪ symbol (i.e., A ∪ B)
• Intersection: Outcomes in both events A and B
‘AND’ statement
Denoted by ∩ symbol (i.e., A ∩ B)
Page 9 of 29
• Two events A and B are disjoint if they have no outcomes in common and can never happen
together. The probability that A or B occurs is then the sum of their individual probabilities.
P(A or B) = “P(A U B)” = P(A) + P(B)
This is the addition rule for disjoint events Two events that are not disjoint, and the event “A and
B” consisting of the outcomes they have in common
Example 3.10:
Page 10 of 29
3.3 Complementary Events
Complement of Event A
• The event that A does not occur
• All events not in A
• Denote complement of A by AC
Rule of Complements
• The sum of the probabilities of complementary events equals 1:
• P(A) + P(AC) = 1
Page 11 of 29
Example:
P(Ace or Black)
= P(Ace) + P(Black – P(Ace and Black)
4 26 2 28
= + − =
52 52 52 52
Example:
6 5 2 9
P(A ∪ D) = 𝑃(𝐴) + 𝑃 (D) − 𝑃(𝐴 ∩ 𝐷) = + − =
10 10 10 10
4 5 1 8
P(B∪C) = P(B) + P (C) - P(B∩C) = + − =
10 10 10 10
Example 3.12
A: {Surgical treatment}, B: {obstetrics treatment}, P(A) = 0.12, P(B)=0.16, P(A and B) = 0.02.
P(A or B)=?
Page 12 of 29
3.5 Conditional Probability
• Event probability given that another event occurred
• Revise original sample space to account for new information
• Eliminates certain outcomes
𝑃(𝐴 𝑎𝑛𝑑 𝐵) 𝑃(𝐴∩𝐵)
P(A/B)) = =
𝑃(𝐵) 𝑃(𝐵)
Example:
P(Ace / Black)
𝑃(𝐴𝑐𝑒 ∩ 𝐵𝑙𝑎𝑐𝑘) 2/52 2
= = =
𝑃(𝐵𝑙𝑎𝑐𝑘) 26/52 26
Example:
𝑃(𝐴 ∩ 𝐷) 2/5 2
P(A/D) = = =
𝑃(𝐷) 5/10 5
𝑃(𝐶∩𝐵) 1/10 1
P(C/B) = = =
𝑃(𝐵) 4/10 4
Example 3.14: A:{Executive who had cheated at golf}, B:{Executive who had lied in business}
P(A) = 0.55, P(A and B) = 0.20, P(B/A) = 0.2/0.55 = 0.364
Example 3.15
𝑃(𝐵∩𝐹) 0.2
• P(F) = 0.3, 𝑃(𝐵⁄𝐹) = = = 0.667
𝑃(𝐹) 0.3
Page 13 of 29
Example 3.16
Statistical Independence
• Event occurrence does not affect probability of another event
• Toss 1 coin twice
• Causality not implied
• Tests for independence
P(A | B) = P(A)
P(B | A) = P(B)
P(A ∩ B) = P(A) P(B)
Page 14 of 29
Example:
5 1 1
P(C ∩ B) = 𝑃(𝐶) ∗ 𝑃(𝐵⁄𝐶) = ∗ =
10 5 10
4 3 6
P(B ∩ D) = 𝑃(𝐵) ∗ 𝑃(𝐷⁄𝐵) = ∗ =
10 5 25
Example:
• The Pew Internet and Canadian Life Project finds that 93% of teenagers (ages 12 to 17) use
the Internet, and that 55% of online teens have posted a profile on a social-networking site.
• What percent of teens are online and have posted a profile?
Page 15 of 29
P(online) = 0.93,
P(profile/online) = 0.55
Example 3.17: B: {Wheat production will be profitable next year}, A: {Drought will occur next year}
P(B/A) = 0.01, P(A) = 0.05➔ P(A∩B) = ? ➔ =P(A)*P(B/A) = 0.05*0.01 = 0.0005
Example 3.18
Example 3.19: tossing a fair die and A(an even number), B:(Less than or equal to 4)
P(A) = P(2) + P(4) + P(6) = 0.5, P(B) =P(1) + P(2) + P(3) + P(4) = 2/3, P(A∩B) = P(2)+P(4) = 1/3
P(A/B) = P(A) = 1/2, P(B/A) = P(B) = 2/3 ➔ A and B are independent
• The QCM would like to answer the following question: If a randomly selected lamp is
defective, what is the probability that the lamp was manufactured in factory C?
• Now, if a randomly selected lamp is defective, what is the probability that the lamp was
manufactured in factory A? And, if a randomly selected lamp is defective, what is the
probability that the lamp was manufactured in factory B?
• Assume that P(D), the probability that a lamp manufactured by The Luminar Company is
defective, is 0.01475.
• The probability that a lamp was manufactured in factory A given that it is defective is:
𝑃(𝐴 ∩ 𝐷) 𝑃(𝐷⁄𝐴) × 𝑃(𝐴) 0.015 × 0.35
𝑃(𝐴⁄𝐷 ) = = = = 0.356
𝑃(𝐷) 𝑃(𝐷) 0.01475
Page 17 of 29
• And, the probability that a lamp was manufactured in factory B given that it is
defective is:
𝑃(𝐵 ∩ 𝐷) 𝑃(𝐷⁄𝐵) × 𝑃(𝐵) 0.01 × 0.35
𝑃(𝐵⁄𝐷 ) = = = = 0.237
𝑃(𝐷) 𝑃(𝐷) 0.01475
Example 3.22
Page 18 of 29
Topic 4: Random Variables and Probability Distributions: Chapter 4
Content
1. Two Types of Random Variables
2. Probability Distributions for Discrete Random Variables
3. The Binomial Distribution
4. Other Discrete Distributions: Poisson and Hypergeometric Distributions
5. Probability Distributions for Continuous Random Variables
6. The Normal Distribution
7. Descriptive Methods for Assessing Normality
8. Other Continuous Distributions: Uniform and Exponential
Learning Objectives
1. Develop the notion of a random variable
2. Learn that numerical data are observed values of either discrete or continuous random
variables
3. Study two important types of random variables and their probability models: the binomial and
normal model
4. Present some additional discrete and continuous random variables
Page 19 of 29
Discrete Random Variable Examples:
Experiment Random Variable Possible Values
Make 100 Sales Calls #Sales 0, 1, 2, …., 100
Inspect 70 TVs #Defective 0, 1, 2, …, 100
Answer 40 MCQs #Collect 0, 1, 2, …, 40
Count Cars at Toll between 9-10 #Cars Arriving 0, 1, 2, 3, ….∞
Page 20 of 29
Example: Number of heads in four tosses of a coin
1 1 1 1 1
• P(HTTH) = 2 × 2 × 2 × 2
= 16
Value X 0 1 2 3 4
Probability 1/16 = 0.0625 0.25 0.375 0.25 0.0625
Summary Measures
• Expected Value (Mean of probability distribution): Weighted average of all possible
values:
μ = E(X) = ∑ 𝑥𝑃(𝑥)
• Standard Deviation
σ = √𝜎 2
Example:
• You toss 2 coins. You’re interested in the number of tails. What are the expected value,
variance, and standard deviation of this random variable, number of tails?
x p(x) xp(x) 𝐱−𝛍 (𝒙 − 𝝁)𝟐 (𝒙 − 𝝁)𝟐 𝒑(𝒙)
0 0.25 0 -1.00 1.00 0.25
1 0.50 0.50 0 0 0
2 0.25 0.50 1.00 1.00 0.25
μ = 1.0 𝜎 2 = 0.50
σ = 0.71
Page 21 of 29
Probability Rules for Discrete Random Variables
• Let x be a discrete random variable with probability distribution p(x), mean µ, and standard
deviation . Then, depending on the shape of p(x), the following probability statements can
be made:
Chebyshev’s Rule Empirical Rule
P (x − x µ + ) 0 .68
P (x − 2 x µ + 2 ) 34 .95
P (x − 3 x µ + 3 ) 89 1.00
Example:
• A bottle cap is tossed three times. We define the random variable X as the number of number
of times the cap drops with the open side up. µX = 2.1.
Value of X 0 1 2 3
𝜎 2 = ∑(𝑥 − 𝜇)2 𝑝(𝑥) = (0 − 8.128)2 (0.001) + (1 − 8.128)2 (0.006) + ⋯ + (10 − 8.128)2 (0.053) = 2.066
σ = √2.066 = 1.437
• The standard deviation of X is 1.437. On average, a randomly selected baby’s Apgar score will
differ from the mean 8.128 by about 1.4 units.
Example 4.4: Tossing two coins, and x be the number of head observed.
P(x=0) = ¼, P(x=1) = ½, P(x=2) = ¼
1 1 1 1 1 1
𝜇 = 𝐸(𝑥) = 0 × 4 + 1 × 2 + 2 × 4 = 1, 𝜎 2 = 𝐸(𝑥 − 𝜇)2 = (0 − 1)2 (4) + (1 − 1)2 (2) + (2 − 1)2 (4) = 0.5,
𝜎 = 0.707
Page 22 of 29
Example 4.5
E(x)=?
Var(x) =?
Example 4.7
X Probability 𝜇 =? 𝜎 =?
$290 0.999
-$9710 0.001 $280 and…
Example 4.8
X 0 1 2 3 4 5 𝜇 = 3.5
P(x) 0.002 0.029 0.132 0.309 0.360 0.168 𝜎 = 1.02
Page 23 of 29
1. Binary? The possible outcomes of each trial can be classified as “success” or “failure.”
2. Independent? Trials must be independent; that is, knowing the result of one trial must not
have any effect on the result of any other trial.
3. Number? The number of trials n of the chance process must be fixed in advance.
4. Success? On each trial, the probability p of success must be the same.
Binomial Distribution
• Consider tossing a coin n times. Each toss gives either heads or tails. Knowing the outcome of
one toss does not change the probability of an outcome on any other toss. If we define heads
as a success, then p is the probability of a head and is 0.5 on any toss.
• The number of heads in n tosses is a binomial random variable X. The probability distribution of
X is called a binomial distribution.
• Binomial distributions are models for some categorical variables, typically representing the
number of successes in a series of n trials.
• The observations must meet these requirements:
- The total number of observations n is fixed in advance.
- Each observation falls into just 1 of 2 categories: success and failure.
- The outcomes of all n observations are statistically independent.
- All n observations have the same probability of “success,” p.
• We express a binomial distribution for the count X of successes among n observations as a
function of the parameters n and p: B(n,p).
- The parameter n is the total number of observations.
- The parameter p is the probability of success on each observation.
- The count of successes X can be any whole number between 0 and n.
Example:
• A coin is flipped 10 times. Each outcome is either a head or a tail.
The variable X is the number of heads among those 10 flips, our count of “successes.”
• On each flip, the probability of success, “head,” is 0.5. The number X of heads among 10 flips
has the binomial distribution B (n = 10, p = 0.5).
Binomial formulas
• The number of ways of arranging k successes in a series of n observations (with constant
probability p of success) is the number of possible combinations (unordered sequences).
• This can be calculated with the binomial coefficient:
𝑛 𝑛!
( )= , where k = 0, 1, 2, … . , or n
𝑘 𝑘! (𝑛 − 𝑘)!
• The binomial coefficient “n_choose_k” uses the factorial notation “!”.
• The factorial n! for any strictly positive whole number n is:
n! = n × (n − 1) × (n − 2) × … … .× 3 × 2 × 1
• For example: 5! = 5 × 4 × 3 × 2 × 1 = 120
• Note that 0! = 1.
• In a binomial setting with n trials and success probability p, the probability of exactly k
successes is
𝑛!
P(X = k) = 𝑝𝑘 (1 − 𝑝)𝑛−𝑘
𝑘! (𝑛 − 𝑘)!
• The probability that a binomial random variable takes any range of values is the sum of each
probability for getting exactly that many successes in n observations.
P(X ≤ 2) = P(X = 0) + P(X = 1) + P(X = 2)
Page 25 of 29
Example:
• Experiment: Toss 1 coin 5 times in a row. Note number of tails. What’s the probability of 3
tails?
5!
P(3) = (0.5)3 (1 − 0.5)5−3 = 0.3125 => 𝑡𝑎𝑏𝑙𝑒 𝑐𝑎𝑛 𝑏𝑒 𝑢𝑠𝑒𝑑,
3! (5 − 3)!
Example:
• You’re a telemarketer selling service contracts for Macy’s. You’ve sold 20 in your last 100 calls
(p = .20). If you call 12 people tonight, what’s the probability of
a. No sales?
b. Exactly 2 sales?
c. At most 2 sales?
d. At least 2 sales?
n= 12, p=0.2:
a: 0.0687, b: 0.2835, c: p(x ≤ 2) = p(0) + p(1) + p(2) = 0.5584, d: p(x ≥ 2) = 1 − p(x ≤ 1) = 0.7251
Example: Color blindness
• The frequency of color blindness (dyschromatopsia) in the Caucasian American male
population is estimated to be about 8%. We take a random sample of size 25 from this
population.
• The population is definitely larger than 20 times the sample size, thus we can approximate the
sampling distribution by B(n = 25, p = 0.08).
• What is the probability that exactly five will be color blind?
P(x = 5) = ?
Use table: B(5, 25, 0.08) = 0.0329
25!
Or P(X = 5) = 5!(25−5)!
0.085 (1 − 0.08)25−5 = 0.0329
• What is the probability that five individuals or fewer in the sample are color blind?
Use table P(x ≤ 5) = 0.9877
• What is the probability that more than five will be color blind?
P(x > 5) = 1 − P(x ≤ 5) =1 − 0.9877 = 0.0123
• The mean and standard deviation of the count of color blind individuals in the SRS of 25
Caucasian American males:
μ = np = 25 × 0.08 = 2, σ = √𝑛𝑝𝑞 = √25 × 0.08 × 0.92 = 1.36
• What if we take an SRS of size 10? Of size 75?
Page 26 of 29
μ = np = 10 × 0.08 = 0.8, σ = √𝑛𝑝𝑞 = √10 × 0.08 × 0.92 = 0.86
Example 4.10: Online cellphone sale: A=Android, I=iPhone, P(A) =.2, P(I) = 0.8
Page 27 of 29
4.4 Other Discrete Distributions: Poisson and Hypergeometric
Poisson Distribution
• Number of events that occur in an interval: events per unit: Time, Length, Area, Space
• X is an open ended, not based on a fixed number of n observations.
• Examples:
- The number of customers at a popular café between 12:00pm and 1:00pm.
- The number of reported pedestrian/bicyclist collusions on campus during the academic
year.
- These counts could be 0, 1, 2, 3, …..
Example:
• Suppose you knew that the mean number of calls to a fire station on a weekday is 8. What is
the probability that on a given weekday there would be 11 calls? This problem can be solved
using the following formula based on the Poisson distribution:
𝑒 −𝜆 𝜆𝑥 𝑒 −8 811
P= = = 0.072
𝑥! 11!
Page 28 of 29
Example:
• A life insurance salesman sells on the average 3 life insurance policies per week. Use Poisson's
law to calculate the probability that in a given week he will sell
a. Some policies
b. 2 or more policies but less than 5 policies.
c. Assuming that there are 5 working days per week, what is the probability that in a given
day he will sell one policy?
• Here, μ = 3
• "Some policies" means "1 or more policies". We can work this out by finding 1 minus the "zero
policies" probability:
• P(X > 0) = 1 − P(x=0)
• The probability of selling 2 or more, but less than 5 policies is: P(2≤X<5)
• Average number of policies sold per day: 3/5 = 0.6.
𝑒 −0.6 0.61
P(X = 1) = = 0.32929
1!
Example: #of calls = 2.1 per day (μ = 2.1)
P(X ≤ 2) = ?
= P(X=0) + P(X=1) + P(X=2) = 0.1225 + 0.2572 + 0.2700 = 0.6497
Example: #students remotely accessing programs in an hr = 17.2
P(X>25) = ? = 1-P(X ≤ 25) = 0.028
Example
Customers arrive at a rate of 72 per hour. What is the probability of 4 customers arriving in 3 minutes?
72 Per Hr. = 1.2 Per Min. = 3.6 Per 3 Min. Interval
𝑒 −3.6 (3.6)4
P(x = 4) = = 0.1912
4!
Example 4.14: Suppose the number of employee absent on Monday is 2.6 and is a Poisson
distribution. X=the number of Monday absentees)
a. Mean and standard deviation of x.
b. The prob of 5 absent
c. The prob of at least 5 absent
d. The prob of at most 5 absent