Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

AP ECON 2500 Session 3 Instructor: Dr. David K.

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

Summary: n = 25, ∑ 𝑥 = 206, 𝑥̅ = 8.24, ∑ 𝑥 2 = 1778, 𝑠 = 1.83

Interval # in interval Percent


𝑥̅ ± 𝑠 = (6.41, 10.07) 18 18/25 = 72%
𝑥̅ ± 2𝑠 = (4.58, 11.90) 24 96%
𝑥̅ ± 3𝑠 = (2.75, 13.73) 25 100%

Order: 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 12


0 5
0 666
0 7777777
0 888
0 9999
1 0000
1 11
1 2

Five number summary: 5 7 8 10 12


Box plot

40−30
#2.90a: x = 40, s = 5, 𝑥̅ = 30, ==> 𝑧 = 5
=2

#2.94: 40 has a z score of -2 and 90 has a z score of 3, μ = ? σ =?


40 − 𝜇 90 − 𝜇
−2 = , and 3 = ==> σ = 10, μ = 60
𝜎 𝜎

Page 1 of 29
#2.108

M= 4, Q1 = 3, Q3 = 6, IQR = 3, skewed to the right, Q3+1.5*IQR = 6+1.5*3 = 10.5, Q3+3*IQR = 6+3*3=15


Outliers detected…

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

𝑛 = 15, 𝑥̅ = 91.4, ∑ 𝑥 = 1371, ∑ 𝑥 2 = 125685, 𝑠 = 5.18

𝐹𝑖𝑣𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑠𝑢𝑚𝑚𝑎𝑟𝑦: 83, 87, 92, 95, 100


IQR=? Outliers?
#2.122

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

sample space S and a probability for each outcome.


Experiment Sample Space
Toss a Coin, Note Face {Head, Tail}
Toss 2 Coins, Note Faces {HH, HT, TH, TT}
Select 1 Card, Note Color {Red, Black}
Play a Football Game {Win, Lose, Tie}
Inspect a Part, Note Quality {Defective, Good}
Observe Gender {Male, Female}

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:

Age group (yr): 18 to 23 24 to 29 30 to 39 40 or over

Probability: 0.57 0.17 0.14 0.12

• Show that this is a legitimate probability model


Each probability is between 0 and 1 and 0.57 + 0.17 + 0.14 + 0.12 = 1
• Find the probability that the chosen students is not in the traditional college age group (18 to
23 years)
P(not 18 to 23 years) = 1 – P(18 to 23 years) = 1 – 0.57 = 0.43
Example 3.4
Sample point Probability A = {Observe exactly one detective}
DD 0.010 B = {Observe at least one detective}
DN 0.045 P(A) = P(DN)+P(ND) = 0.045 + 0.045 = 0.09
ND 0.045 P(B) = 0.045+0.045+0.01 = 0.10
NN 0.900
Total 1.000

Page 7 of 29
Example 3.5

• Prob of business related to competition or productivity


• P(B) = P(IP) + P(SC) = 0.47+0.38 = 0.85
Combinations Rule
• A sample of n elements is to be drawn from a set of N elements. Then, the number of different
𝑁
samples possible is denoted by ( ) and is equal to
𝑛
𝑁 𝑁!
• ( )= 𝑎𝑛𝑑 𝑛! = 𝑛(𝑛 − 1)(𝑛 − 2) … . (3)(2)(1)
𝑛 𝑛!(𝑁−𝑛)!
• Example: 5! = 5 × 4 × 3 × 2 × 1 = 120, and 0! = 1
Example 3.6
• Four ventures. Two will be success and two failures. Not known for which will be success or
failure. You are choosing 2 from these fours.
a. What is the probability that you would select at least one successful venture? (S1, S2, F1, F2)
• Six sample points: (S1 S2), (S1, F1), (S1, F2), (S2, F1), (S2, F2), (F1, F2)
• Probability of at least one success = 5/6
b. You are selecting two out of 4, how many different selections?
4 4!
( )= =6
2 2! (4 − 2)!
Example 3.8
Suppose you plan to invest equal amounts of money in each of five business ventures. If you have 20
ventures from which to make the selection, how many different samples of five ventures can be
selected from the 20?
For this example, N = 20 and n = 5. Then the number of different samples of 5 that can be selected
from the 20 ventures is
20 20!
( )= = 15,504
5 5! (20 − 5)!
Example: Winning Lotto
• Select 6 numbers of your choice from a set of numbers ranging from 1 to 53.
• N = 53, n = 6
𝑁 𝑁! 53!
( ) = 𝑛!(𝑁−𝑛)! = = 22,957,480
𝑛 6!47!

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)

Compound Event Probability


• Numerical measure of likelihood that compound event will occur
• Can often use two–way table Two variables only
Example:
The Probabilities Are:
The Probabilities Are:
1. P(A) = 6/10
2. P(D) = 5/10
3. P(C ∩ B) = 1/10
4. P(A ∪D) = 9/10
5. P(B ∩ D) = 3/10

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.9: A die-toss experiment:


A: {Toss an even number}; B:{Toss a number less than or equal to 3}
• A ∪ B = {1, 2, 3, 4, 6}
• A ∩ B = {2}
5
• P(A ∪ B) = 6
1
• P(A∩ B) = 6

Example 3.10:

A: more than $50,000; B: 30 or more


P(A) =0.29, P(B)=0.73, P(A∪ 𝐵) = 0.83, 𝑃(𝐴 ∩ 𝐵) = 0.19

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

Example 3.11 Tossing a coin, A: {at least one head}


• P(A) if 2 coins are tossed:
1 3
S ={HH, HT, TH, TT}, A={HH, HT, TH}; 𝐴𝑐 = (𝑇𝑇), 𝑃(𝐴)1 − 𝑃(𝐴𝐶 ) = 1 − 4 = 4

• P(A) if 10 coins are tossed:


1 1023
• 210 = 1024, 𝑃(𝐴𝐶 ) = , 𝑃(𝐴) = 1 − 𝑃(𝐴𝐶 ) =
1024 1024

3.4 The Additive Rule and Mutually Exclusive Events


Mutually Exclusive Events
• Events do not occur simultaneously
• A ∩ B does not contain any sample points
Example:
Additive Rule
• Used to get compound probabilities for union of events
• P(A OR B) = P(A ∪ B) = P(A) + P(B) – P(A ∩ B)
• For mutually exclusive events: P(A OR B) = P(A ∪ B) = P(A) + P(B)

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)=?

Example 3.13: Tossing a coin twice,


A: {at least one head}, B: {exactly one head}, C: {exactly two heads}
1 1 3
Note A = B ∪ C, P(A) = 𝑃(𝐵 ∪ 𝐶) = 𝑃(𝐵) + 𝑃(𝐶) = + =
2 4 4

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

A: Appearance, B: During the guarantee period


P(A)= 0.35, P(B)=0.63, P(A∩B) = 0.32, P(A/B) = 0.32/0.63 = 0.51

3.6 The Multiplicative Rule and Independent Events


Multiplicative Rule
• Used to get compound probabilities for intersection of events
• P(A and B) = P(A ∩ B) = P(A)  P(B|A) = P(B)  P(A|B)
• For Independent Events: P(A and B) = P(A ∩ B) = P(A)  P(B)
Example:
P(Ace ∩ Black) = P(Ace)*P(Black/Ace)
4 2 2
= ∗ =
52 4 52

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

P(A ∩ B) = 𝑃(𝐴) ∗ 𝑃(𝐵⁄𝐴) = 0

Example: Probability trees


• Conditional probabilities can get complex, and it is often a good strategy to build a
probability tree that represents all possible outcomes graphically and assigns conditional
probabilities to subsets of events.

• P(A1) = 0.29, P(C/A1) = 0.47, P(A1 and C) = P(A1)*P(C/A1) = 0.1363, etc


• P(chatting) = 0.136 + 0.099 + 0.017 = 0.252
• About 25% of all adult Internet users visit chat rooms

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

P(online and profile)


=P(online)*P(profile/online)
= 0.93*0.55 = 0.5115

•51.15% of teens are online and have


posted a profile.

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

Example 3.20: Based on Example 3.16, Are A and B independent? NO


P(A)= 0.35, P(B)=0.63, P(A∩B) = 0.32, P(A/B) = 0.32/0.63 = 0.51≠ P(A)
Page 16 of 29
3.7 Bayes’s Rule
• An important application of conditional probabilities is Bayes’s rule. It is the foundation of
many modern statistical applications beyond the scope of this textbook.
• Suppose that a sample space is decomposed into k disjoint events A1, A2, … , Ak —none of
which has a 0 probability—such that P(A1) + P(A2) + … + P(Ak) = 1,
• Let C be any other event such that P(C) is not 0. Then
P(C | Ai ) P( Ai )
P( Ai | C ) =
P(C | A1 ) P( A1 ) + P(C | A2 ) P( A2 ) + + P(C | Ak ) P( Ak )
• However, it is often intuitively much easier to work out answers with a probability tree than with
these lengthy formulas.
Example
• A desk lamp produced by The Luminar Company was found to be defective (D). There are
three factories (A, B, C) where such desk lamps are manufactured. A Quality Control Manager
(QCM) is responsible for investigating the source of found defects. This is what the QCM knows
about the company's desk lamp production and the possible source of defects:

Factory % of total production Probability of defective lamps

A 0.35 = P(A) 0.015 = P(D | A)

B 0.35 = P(B) 0.010 = P(D | B)

C 0.30 = P(C) 0.020 = P(D | C)

• 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

P(Rainy) = 0.045+0.01 = 0.055


P(D/Rainy) = 0.045/0.055 = 0.818

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

4.1 Two Types of Random Variables


Discrete Random Variable
• There are two main types of random variables: discrete and continuous. If we can find a way
to list all possible outcomes for a random variable and assign probabilities to each one, we
have a discrete random variable.
• Random variables that can assume a countable number (finite or infinite) of values are called
discrete.
• A discrete random variable X takes a fixed set of possible values with gaps between. The
probability distribution of a discrete random variable X lists the values xi and their probabilities
pi:
Value: x1 x2 x3 …
Probability: p1 p2 p3 …
• The probabilities pi must satisfy two requirements:
1. Every probability pi is a number between 0 and 1.
2. The sum of the probabilities is 1.
• To find the probability of any event, add the probabilities pi of the particular values xi that
make up the event.

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, ….∞

Continuous Random Variable


• Random variables that can assume values corresponding to any of the points contained in
one or more intervals (i.e., values that are infinite and uncountable) are called continuous.
Continuous Random Variable Examples:
Experiment Random Variable Possible Values
Weigh 100 People Weight (Kg) 46, 71, 56.5
Measure Part Life Hours 900, 875, 901.1,….
Amount Spent on Food $ 54, 42.12, …

4.2 Probability Distributions for Discrete Random Variables


• The probability distribution of a discrete random variable is a graph, table, or formula that
specifies the probability associated with each possible value the random variable can
assume.
Requirements for the Probability Distribution of a Discrete Random Variable x
1. p(x) ≥ 0 for all values of x
2. ∑ 𝑃(𝑋) = 1 where the summation of p(x) is over all possible values of x.

Example Grade distribution


• There are 130 students in one English class at a liberal arts college
• 31 % received A, 40% received B, 20% C, 4% D, and 5% F.
• The random variable X is the student’s grade on a five-point scale (with A = 4)
Value X 0 1 2 3 4
Probability 0.05 0.04 0.20 0.40 0.31

• The prob that the student got a B or better


P(X ≥ 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

• Prob of at least 2 heads = P(X ≥ 2) =


• Prob of exact 2 heads = P(X=2) =

Summary Measures
• Expected Value (Mean of probability distribution): Weighted average of all possible
values:

μ = E(X) = ∑ 𝑥𝑃(𝑥)

• Variance: Weighted average of squared deviation about mean

𝜎 2 = 𝐸(𝑥 − 𝜇)2 = ∑(𝑥 − 𝜇)2 𝑝(𝑥)

• 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

Probability .027 .189 .441 .343

• 𝜇𝑥 = 𝐸(𝑋) = ∑ 𝑥𝑃(𝑥) = 0 ∗ 0.027 + 1 ∗ 0.189 + 2 ∗ 0.441 + 3 ∗ 0.343 = 2.1


• σ2 = .027*(0−2.1)2 + .189*(1−2.1)2 + .441*(2−2.1)2 + .343*(3−2.1)2
= .11907 + .22869 + .00441 + .27783 = .63
Example:
• Apgar Scores―How Variable Are They?

μ = ∑ 𝑥𝑝(𝑥) = 0 × 0.001 + 1 × 0.006 + ⋯ + 10 × 0.053 = 8.128

𝜎 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

4.3 The Binomial Distribution


The Binomial Setting
• When the same chance process is repeated several times, we are often interested in whether
a particular outcome does or does not happen on each repetition. In some cases, the
number of repeated trials is fixed in advance, and we are interested in the number of times a
particular event (called a “success”) occurs.
• A binomial setting arises when we perform several independent trials of the same chance
process and record the number of times that a particular outcome occurs. The four conditions
(called BINS) for a binomial setting are:

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 distribution in statistical sampling


• A population contains a proportion p of successes. If the population is much larger than the
sample, the count X of successes in an SRS of size n has approximately the binomial distribution
B(n, p).
Page 24 of 29
• The n observations will be nearly independent when the size of the population is much larger
than the size of the sample. As a rule of thumb, the binomial sampling distribution for counts
can be used when the population is at least 20 times as large as the sample.
Binomial mean and standard deviation
• The center and spread of the binomial distribution for a count X are defined by the mean μ
and standard deviation σ:

• μ = np, σ = √𝑛𝑝𝑞 = √𝑛𝑝(1 − 𝑝)


Effect of changing p when n is fixed.
• n = 10, p = 0.25
• n = 10, p = 0.5
• n = 10, p = 0.75
• For small samples, binomial distributions are skewed when p is different from 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

μ = np = 75 × 0.08 = 6, σ = √𝑛𝑝𝑞 = √75 × 0.08 × 0.92 = 3.35

Example 4.10: Online cellphone sale: A=Android, I=iPhone, P(A) =.2, P(I) = 0.8

With the binomial formula:


a. The prob of all of the next fours being Android.
b. The prob of three out of the next fours being Android.
c. The prob of at least 3 being Android.

Example 4.11: Auto engine.. 10% are defective and select 5.


a. The prob of 3 being defective.
b. The prob of at least 3 being defective
c. The prob of at most 3 being defective.
d. Compute the mean and standard deviation of the defective.

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, …..

Characteristics of a Poisson Random Variable


1. Consists of counting number of times an event occurs during a given unit of time or in a given
area or volume (any unit of measurement).
2. The probability that an event occurs in a given unit of time, area, or volume is the same for all
units.
3. The number of events that occur in one unit of time, area, or volume is independent of the
number that occur in any other mutually exclusive unit.
4. The mean number of events in each unit is denoted by the Greek letter lambda, 
Poisson Probability Distribution Function
• The distribution of the count X of successes is the Poisson distribution with mean λ, and the
standard deviation √𝜆 (μ = λ, 𝜎 2 = 𝜆).
• The probability of x successes:
𝑒 −𝜆 𝜆𝑥 Where
p(x) = e is the base of natural logarithms (2.7183)
𝑥!
λ is the mean number of "successes"
x is the number of "successes" in question

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

Hypergeometric Random Variable: TBA..


Page 29 of 29

You might also like