lecture 7: random variables and probability …i introduce probability distributions, which are...

230
Lecture 7: Random Variables and Probability Distributions API-201Z Maya Sen Harvard Kennedy School http://scholar.harvard.edu/msen

Upload: others

Post on 04-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Lecture 7:Random Variables and Probability Distributions

API-201Z

Maya Sen

Harvard Kennedy Schoolhttp://scholar.harvard.edu/msen

Page 2: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Announcements

I Problem Set #4 posted

I We’ll be posting several practice exams and practice problemsin advance of midterm

Page 3: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Announcements

I Problem Set #4 posted

I We’ll be posting several practice exams and practice problemsin advance of midterm

Page 4: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Announcements

I Problem Set #4 posted

I We’ll be posting several practice exams and practice problemsin advance of midterm

Page 5: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:I Introduce probability distributions, which are foundational for

statistical inferenceI Random variablesI Give examples of discrete and continuous random variablesI Walk through probability distributions for discrete random

variables (continuous next time)I Introduce Bernoulli processes

Page 6: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:I Introduce probability distributions, which are foundational for

statistical inferenceI Random variablesI Give examples of discrete and continuous random variablesI Walk through probability distributions for discrete random

variables (continuous next time)I Introduce Bernoulli processes

Page 7: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:

I Introduce probability distributions, which are foundational forstatistical inference

I Random variablesI Give examples of discrete and continuous random variablesI Walk through probability distributions for discrete random

variables (continuous next time)I Introduce Bernoulli processes

Page 8: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:I Introduce probability distributions, which are foundational for

statistical inference

I Random variablesI Give examples of discrete and continuous random variablesI Walk through probability distributions for discrete random

variables (continuous next time)I Introduce Bernoulli processes

Page 9: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:I Introduce probability distributions, which are foundational for

statistical inferenceI Random variables

I Give examples of discrete and continuous random variablesI Walk through probability distributions for discrete random

variables (continuous next time)I Introduce Bernoulli processes

Page 10: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:I Introduce probability distributions, which are foundational for

statistical inferenceI Random variablesI Give examples of discrete and continuous random variables

I Walk through probability distributions for discrete randomvariables (continuous next time)

I Introduce Bernoulli processes

Page 11: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:I Introduce probability distributions, which are foundational for

statistical inferenceI Random variablesI Give examples of discrete and continuous random variablesI Walk through probability distributions for discrete random

variables (continuous next time)

I Introduce Bernoulli processes

Page 12: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Roadmap

I By now, be comfortable w/ summary statistics in Stata/R,basic probability, conditional probability, independence, LOTP,Bayes’ Rule

I Now:I Introduce probability distributions, which are foundational for

statistical inferenceI Random variablesI Give examples of discrete and continuous random variablesI Walk through probability distributions for discrete random

variables (continuous next time)I Introduce Bernoulli processes

Page 13: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 14: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon

: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 15: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 16: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 times

I Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 17: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. Senators

I Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 18: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 19: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables

: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 20: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 21: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flips

I Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 22: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you call

I Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 23: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctly

I Can take on a set of possible different numerical values, eachwith an associated probability

I RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 24: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probability

I RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 25: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or Y

I Note: Random variable = number (e.g, number of heads),random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 26: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 27: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Random phenomenon: A situation where we know whatoutcomes could happen, but we don’t know which particularoutcome did or will happen

I Ex) Flipping a coin 3 timesI Ex) Randomly calling 5 U.S. SenatorsI Ex) Lady Bristol choosing 4 cups of tea out of 8

I Random variables: (1) Numerical outcomes of (2) randomphenomenon

I Ex) Number of Heads in 3 coin flipsI Ex) Number of female Democrats you callI Ex) Number of 4 cups Lady identifies correctlyI Can take on a set of possible different numerical values, each

with an associated probabilityI RVs denoted by capital letters – e.g., X or YI Note: Random variable = number (e.g, number of heads),

random event = event (e.g., tossing heads)

I As before, “random” does not mean “haphazard”

Page 28: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 timesI Random variable →

I Sequence of outcomes of the flips, e.g. HTH, is not a randomvariable (not a number)

I But we could make it into a random variable, X , by making it# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 29: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 timesI Random variable →

I Sequence of outcomes of the flips, e.g. HTH, is not a randomvariable (not a number)

I But we could make it into a random variable, X , by making it# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 30: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 times

I Random variable →I Sequence of outcomes of the flips, e.g. HTH, is not a random

variable (not a number)I But we could make it into a random variable, X , by making it

# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 31: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 timesI Random variable →

I Sequence of outcomes of the flips, e.g. HTH, is not a randomvariable (not a number)

I But we could make it into a random variable, X , by making it# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 32: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 timesI Random variable →

I Sequence of outcomes of the flips, e.g. HTH, is not a randomvariable (not a number)

I But we could make it into a random variable, X , by making it# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 33: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 timesI Random variable →

I Sequence of outcomes of the flips, e.g. HTH, is not a randomvariable (not a number)

I But we could make it into a random variable, X , by making it# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 34: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 timesI Random variable →

I Sequence of outcomes of the flips, e.g. HTH, is not a randomvariable (not a number)

I But we could make it into a random variable, X , by making it# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 35: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

What are random variables?

I Example: You toss a coin 3 times

I Random phenomenon → act of tossing the coin 3 timesI Random variable →

I Sequence of outcomes of the flips, e.g. HTH, is not a randomvariable (not a number)

I But we could make it into a random variable, X , by making it# of Heads in 3 flips

I Note: Sample space can have many different random variablesdefined on it (e.g., number of tails flips, Y )

I Random variable → one of several possible mapping fromsample space (HTH) into a number (in this case, 2)

Page 36: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Random Variables

I A discrete random variable can take on only integer(countable) number of values (usually within an interval)

I Examples:I Outcomes when you roll a roulette wheelI Number of times a particular word is used in a documentI Number of Democrats in U.S. Senate

I → In theory, you could count up these values, given finiteamount of time

Page 37: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Random Variables

I A discrete random variable can take on only integer(countable) number of values (usually within an interval)

I Examples:I Outcomes when you roll a roulette wheelI Number of times a particular word is used in a documentI Number of Democrats in U.S. Senate

I → In theory, you could count up these values, given finiteamount of time

Page 38: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Random Variables

I A discrete random variable can take on only integer(countable) number of values (usually within an interval)

I Examples:

I Outcomes when you roll a roulette wheelI Number of times a particular word is used in a documentI Number of Democrats in U.S. Senate

I → In theory, you could count up these values, given finiteamount of time

Page 39: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Random Variables

I A discrete random variable can take on only integer(countable) number of values (usually within an interval)

I Examples:I Outcomes when you roll a roulette wheel

I Number of times a particular word is used in a documentI Number of Democrats in U.S. Senate

I → In theory, you could count up these values, given finiteamount of time

Page 40: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Random Variables

I A discrete random variable can take on only integer(countable) number of values (usually within an interval)

I Examples:I Outcomes when you roll a roulette wheelI Number of times a particular word is used in a document

I Number of Democrats in U.S. Senate

I → In theory, you could count up these values, given finiteamount of time

Page 41: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Random Variables

I A discrete random variable can take on only integer(countable) number of values (usually within an interval)

I Examples:I Outcomes when you roll a roulette wheelI Number of times a particular word is used in a documentI Number of Democrats in U.S. Senate

I → In theory, you could count up these values, given finiteamount of time

Page 42: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Random Variables

I A discrete random variable can take on only integer(countable) number of values (usually within an interval)

I Examples:I Outcomes when you roll a roulette wheelI Number of times a particular word is used in a documentI Number of Democrats in U.S. Senate

I → In theory, you could count up these values, given finiteamount of time

Page 43: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:I Annual rainfall in BangladeshI Time it takes to run a 100m dashI Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 44: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:I Annual rainfall in BangladeshI Time it takes to run a 100m dashI Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 45: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:

I Annual rainfall in BangladeshI Time it takes to run a 100m dashI Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 46: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:I Annual rainfall in Bangladesh

I Time it takes to run a 100m dashI Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 47: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:I Annual rainfall in BangladeshI Time it takes to run a 100m dash

I Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 48: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:I Annual rainfall in BangladeshI Time it takes to run a 100m dashI Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 49: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:I Annual rainfall in BangladeshI Time it takes to run a 100m dashI Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 50: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Continuous Random Variables (next time)

I A continuous random variable that can take on any value(usually within an interval) on the real number line

I Examples:I Annual rainfall in BangladeshI Time it takes to run a 100m dashI Time until next earthquake in Japan

I → Cannot count these quantities, given finite amount of time

I Much of intuition we cover today applies to both

Page 51: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

How do we describe random variables?

I We describe distribution of random variables using probabilitydistributions

I Probability distributions represent information about howlikely various outcomes of X are

I 2 common ways of representing probability distributions fordiscrete random variables are via:

1. Probability mass functions (f (x))2. Cumulative mass functions (F (x))

I Similar for continuous distributions: probability densityfunctions, cumulative density functions

Page 52: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

How do we describe random variables?

I We describe distribution of random variables using probabilitydistributions

I Probability distributions represent information about howlikely various outcomes of X are

I 2 common ways of representing probability distributions fordiscrete random variables are via:

1. Probability mass functions (f (x))2. Cumulative mass functions (F (x))

I Similar for continuous distributions: probability densityfunctions, cumulative density functions

Page 53: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

How do we describe random variables?

I We describe distribution of random variables using probabilitydistributions

I Probability distributions represent information about howlikely various outcomes of X are

I 2 common ways of representing probability distributions fordiscrete random variables are via:

1. Probability mass functions (f (x))2. Cumulative mass functions (F (x))

I Similar for continuous distributions: probability densityfunctions, cumulative density functions

Page 54: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

How do we describe random variables?

I We describe distribution of random variables using probabilitydistributions

I Probability distributions represent information about howlikely various outcomes of X are

I 2 common ways of representing probability distributions fordiscrete random variables are via:

1. Probability mass functions (f (x))2. Cumulative mass functions (F (x))

I Similar for continuous distributions: probability densityfunctions, cumulative density functions

Page 55: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

How do we describe random variables?

I We describe distribution of random variables using probabilitydistributions

I Probability distributions represent information about howlikely various outcomes of X are

I 2 common ways of representing probability distributions fordiscrete random variables are via:

1. Probability mass functions (f (x))

2. Cumulative mass functions (F (x))

I Similar for continuous distributions: probability densityfunctions, cumulative density functions

Page 56: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

How do we describe random variables?

I We describe distribution of random variables using probabilitydistributions

I Probability distributions represent information about howlikely various outcomes of X are

I 2 common ways of representing probability distributions fordiscrete random variables are via:

1. Probability mass functions (f (x))2. Cumulative mass functions (F (x))

I Similar for continuous distributions: probability densityfunctions, cumulative density functions

Page 57: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

How do we describe random variables?

I We describe distribution of random variables using probabilitydistributions

I Probability distributions represent information about howlikely various outcomes of X are

I 2 common ways of representing probability distributions fordiscrete random variables are via:

1. Probability mass functions (f (x))2. Cumulative mass functions (F (x))

I Similar for continuous distributions: probability densityfunctions, cumulative density functions

Page 58: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI TableI Relative frequency histogram (bar plot)I Formula itself

Page 59: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI TableI Relative frequency histogram (bar plot)I Formula itself

Page 60: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI TableI Relative frequency histogram (bar plot)I Formula itself

Page 61: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI TableI Relative frequency histogram (bar plot)I Formula itself

Page 62: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI TableI Relative frequency histogram (bar plot)I Formula itself

Page 63: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFs

I TableI Relative frequency histogram (bar plot)I Formula itself

Page 64: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI Table

I Relative frequency histogram (bar plot)I Formula itself

Page 65: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI TableI Relative frequency histogram (bar plot)

I Formula itself

Page 66: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability mass functions (PMFs)

I Probability mass functions: A function that defines theprobability of each possible outcome

f (x) = P(X = x)

where X is the random variable, x possible value it could take

I Provides you with all possible outcomes and probability ofeach outcome

I Three ways of describing PMFsI TableI Relative frequency histogram (bar plot)I Formula itself

Page 67: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Sample space of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 68: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Sample space of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 69: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Sample space of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 70: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Sample space of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 71: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Sample space of possible outcomes would look like:

Event Value of X

1) TTT 0

2) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 72: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Sample space of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 73: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 74: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 75: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 76: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 77: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 78: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 79: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 80: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I All probabilities, between 0 and 1, inclusive

I Probabilities add up to 1

I Note: You’d only know this distribution if you repeated therandom phenomenon over and over again!

Page 81: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Could also represent this graphically:

X = 0 X = 1 X = 2 X = 3

Probability Mass Distribution

0.0

0.1

0.2

0.3

0.4

0.5

I Again note: Heights of bars add up to 1

Page 82: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Could also represent this graphically:

X = 0 X = 1 X = 2 X = 3

Probability Mass Distribution

0.0

0.1

0.2

0.3

0.4

0.5

I Again note: Heights of bars add up to 1

Page 83: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Could also represent this graphically:

X = 0 X = 1 X = 2 X = 3

Probability Mass Distribution

0.0

0.1

0.2

0.3

0.4

0.5

I Again note: Heights of bars add up to 1

Page 84: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Could also represent this graphically:

X = 0 X = 1 X = 2 X = 3

Probability Mass Distribution

0.0

0.1

0.2

0.3

0.4

0.5

I Again note: Heights of bars add up to 1

Page 85: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:I TableI Relative frequency histogramI Formula itself

Page 86: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:I TableI Relative frequency histogramI Formula itself

Page 87: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:I TableI Relative frequency histogramI Formula itself

Page 88: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:I TableI Relative frequency histogramI Formula itself

Page 89: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:

I TableI Relative frequency histogramI Formula itself

Page 90: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:I Table

I Relative frequency histogramI Formula itself

Page 91: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:I TableI Relative frequency histogram

I Formula itself

Page 92: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Cumulative Mass Function

I Probability mass function describes the probability of eachpossible outcome, f (x) = P(X = x)

I A cumulative mass function (CMF) gives us the probabilitythat a random variable X takes on a value less than or equalto some particular value x :

F (x) = P(X 6 x)

=∑X6x

P(X = x)

I Can also represent CMFs using:I TableI Relative frequency histogramI Formula itself

Page 93: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Universe of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 94: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Universe of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 95: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Universe of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 96: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Universe of possible outcomes would look like:

Event Value of X

1) TTT 02) TTH 13) THT 14) HTT 15) THH 26) HTH 27) HHT 28) HHH 3

Page 97: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I Cumulative mass function distribution would look like:

0 1 2 3

F (x) 1/8 4/8 7/8 1

Page 98: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I Cumulative mass function distribution would look like:

0 1 2 3

F (x) 1/8 4/8 7/8 1

Page 99: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I Cumulative mass function distribution would look like:

0 1 2 3

F (x) 1/8 4/8 7/8 1

Page 100: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I Cumulative mass function distribution would look like:

0 1 2 3

F (x) 1/8 4/8 7/8 1

Page 101: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I Cumulative mass function distribution would look like:

0 1 2 3

F (x) 1/8 4/8 7/8 1

Page 102: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I Let X be the number of heads in 3 coin flips

I Probability mass function distribution would look like

0 1 2 3

f (x) 1/8 3/8 3/8 1/8

I Cumulative mass function distribution would look like:

0 1 2 3

F (x) 1/8 4/8 7/8 1

Page 103: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I And then we can also represent the CMF graphically:

X = 0 X = 1 X = 2 X = 3

Probability Mass Distribution

0.0

0.1

0.2

0.3

0.4

0.5

X ≤ 0 X ≤ 1 X ≤ 2 X ≤ 3

Cumulative Mass Distribution

0.0

0.2

0.4

0.6

0.8

1.0

Page 104: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I And then we can also represent the CMF graphically:

X = 0 X = 1 X = 2 X = 3

Probability Mass Distribution

0.0

0.1

0.2

0.3

0.4

0.5

X ≤ 0 X ≤ 1 X ≤ 2 X ≤ 3

Cumulative Mass Distribution

0.0

0.2

0.4

0.6

0.8

1.0

Page 105: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Discrete Example

I And then we can also represent the CMF graphically:

X = 0 X = 1 X = 2 X = 3

Probability Mass Distribution

0.0

0.1

0.2

0.3

0.4

0.5

X ≤ 0 X ≤ 1 X ≤ 2 X ≤ 3

Cumulative Mass Distribution

0.0

0.2

0.4

0.6

0.8

1.0

Page 106: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 107: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openings

I 3 of the candidates are women and 2 are men:I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 108: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 109: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 110: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 111: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hired

I X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 112: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 113: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 114: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I There are 5 candidates for 2 job openingsI 3 of the candidates are women and 2 are men:

I W1, W2, W3, M1, M2

I Let X be a random variable that is the # of women hiredI X ∈ {0, 1, 2}

I What is the PMF of X?

I What is the CMF of X?

Page 115: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

10 possibilities in the sample space:

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

Page 116: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

10 possibilities in the sample space:

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

Page 117: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

10 possibilities in the sample space:

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

Page 118: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

10 possibilities in the sample space:

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

Page 119: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

10 possibilities in the sample space:

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

Page 120: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

10 possibilities in the sample space:

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

Page 121: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

10 possibilities in the sample space:

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

Page 122: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) ? ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 123: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) ? ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 124: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) ? ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 125: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) ? ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 126: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) ? ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 127: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) ? ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 128: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) ? ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 129: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 130: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 ? ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 131: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 132: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 ?

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 133: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) ? ? ?

Page 134: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 ? ?

Page 135: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 ?

Page 136: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I (W1, W2) (W1, W3) (W1, M1) (W1, M2)

I (W2, W3) (W2, M1) (W2, M2)

I (W3, M1) (W3, M2)

I (M1, M2)

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

Page 137: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 138: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 139: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 140: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 141: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 142: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 143: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 144: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 145: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

I Can use this information to address substantive questions

I Probability mass function distribution:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

I Cumulative mass function distribution:

X 6 0 X 6 1 X 6 2

F (x) 1/10 7/10 1

I Would you be concerned if 1 or fewer women were hired?

I Would you be concerned if exactly 1 woman was hired?

I Would you be concerned if no women were hired?

Page 146: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected valueI VarianceI Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 147: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected valueI VarianceI Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 148: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected value

I VarianceI Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 149: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected valueI Variance

I Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 150: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected valueI VarianceI Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 151: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected valueI VarianceI Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 152: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected valueI VarianceI Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 153: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Key features of probability distributions

I Similar to a sample of data, we can calculate useful info aboutprobability distribution:

I Expected valueI VarianceI Standard deviation

I Use Greek letters to denote these population parameters

I Can’t actually measure these empirically, but can calculatethem based on what we think would happen if we repeatedthe random process over and over again

I Conceptually distinct from (but completely analogous to)sample parameters from earlier

Page 154: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Expected value

I Expected value: a measure of the center of a probabilitydistribution

I Denoted as µ

E [X ] = µX

=∑all x

xp(x)

I Sum of all possible values, each weighted by its relativeprobability

I Substantively: If we repeated random process repeatedly andaveraged values together, what would we expect to find?

Page 155: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Expected value

I Expected value: a measure of the center of a probabilitydistribution

I Denoted as µ

E [X ] = µX

=∑all x

xp(x)

I Sum of all possible values, each weighted by its relativeprobability

I Substantively: If we repeated random process repeatedly andaveraged values together, what would we expect to find?

Page 156: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Expected value

I Expected value: a measure of the center of a probabilitydistribution

I Denoted as µ

E [X ] = µX

=∑all x

xp(x)

I Sum of all possible values, each weighted by its relativeprobability

I Substantively: If we repeated random process repeatedly andaveraged values together, what would we expect to find?

Page 157: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Expected value

I Expected value: a measure of the center of a probabilitydistribution

I Denoted as µ

E [X ] = µX

=∑all x

xp(x)

I Sum of all possible values, each weighted by its relativeprobability

I Substantively: If we repeated random process repeatedly andaveraged values together, what would we expect to find?

Page 158: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Expected value

I Expected value: a measure of the center of a probabilitydistribution

I Denoted as µ

E [X ] = µX

=∑all x

xp(x)

I Sum of all possible values, each weighted by its relativeprobability

I Substantively: If we repeated random process repeatedly andaveraged values together, what would we expect to find?

Page 159: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Expected value

I Expected value: a measure of the center of a probabilitydistribution

I Denoted as µ

E [X ] = µX

=∑all x

xp(x)

I Sum of all possible values, each weighted by its relativeprobability

I Substantively: If we repeated random process repeatedly andaveraged values together, what would we expect to find?

Page 160: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Variance and Standard Deviation

I Variance: Measure of the spread of a probability distribution:

V [X ] = σ2

=∑all x

(x − µ)2p(x)

I Standard deviation: Square root of the variance

SD[X ] = σ

=√σ2

Page 161: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Variance and Standard Deviation

I Variance: Measure of the spread of a probability distribution:

V [X ] = σ2

=∑all x

(x − µ)2p(x)

I Standard deviation: Square root of the variance

SD[X ] = σ

=√σ2

Page 162: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Variance and Standard Deviation

I Variance: Measure of the spread of a probability distribution:

V [X ] = σ2

=∑all x

(x − µ)2p(x)

I Standard deviation: Square root of the variance

SD[X ] = σ

=√σ2

Page 163: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Variance and Standard Deviation

I Variance: Measure of the spread of a probability distribution:

V [X ] = σ2

=∑all x

(x − µ)2p(x)

I Standard deviation: Square root of the variance

SD[X ] = σ

=√σ2

Page 164: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Variance and Standard Deviation

I Variance: Measure of the spread of a probability distribution:

V [X ] = σ2

=∑all x

(x − µ)2p(x)

I Standard deviation: Square root of the variance

SD[X ] = σ

=√σ2

Page 165: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination Example

Probability mass function distribution from earlier:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

µ =

(1

10× 0

)+

(6

10× 1

)+

(3

10× 2

)=

12

10

σ2 =

(0 −

12

10

)2 1

10+

(1 −

12

10

)2 6

10+

(2 −

12

10

)2 3

10

=144

1000+

24

1000+

192

1000=

360

1000=

9

25

σ =3

5

Page 166: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination ExampleProbability mass function distribution from earlier:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

µ =

(1

10× 0

)+

(6

10× 1

)+

(3

10× 2

)=

12

10

σ2 =

(0 −

12

10

)2 1

10+

(1 −

12

10

)2 6

10+

(2 −

12

10

)2 3

10

=144

1000+

24

1000+

192

1000=

360

1000=

9

25

σ =3

5

Page 167: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination ExampleProbability mass function distribution from earlier:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

µ =

(1

10× 0

)+

(6

10× 1

)+

(3

10× 2

)=

12

10

σ2 =

(0 −

12

10

)2 1

10+

(1 −

12

10

)2 6

10+

(2 −

12

10

)2 3

10

=144

1000+

24

1000+

192

1000=

360

1000=

9

25

σ =3

5

Page 168: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination ExampleProbability mass function distribution from earlier:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

µ =

(1

10× 0

)+

(6

10× 1

)+

(3

10× 2

)=

12

10

σ2 =

(0 −

12

10

)2 1

10+

(1 −

12

10

)2 6

10+

(2 −

12

10

)2 3

10

=144

1000+

24

1000+

192

1000=

360

1000=

9

25

σ =3

5

Page 169: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination ExampleProbability mass function distribution from earlier:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

µ =

(1

10× 0

)+

(6

10× 1

)+

(3

10× 2

)=

12

10

σ2 =

(0 −

12

10

)2 1

10+

(1 −

12

10

)2 6

10+

(2 −

12

10

)2 3

10

=144

1000+

24

1000+

192

1000=

360

1000=

9

25

σ =3

5

Page 170: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Sex Discrimination ExampleProbability mass function distribution from earlier:

X = 0 X = 1 X = 2

f (x) 1/10 6/10 3/10

µ =

(1

10× 0

)+

(6

10× 1

)+

(3

10× 2

)=

12

10

σ2 =

(0 −

12

10

)2 1

10+

(1 −

12

10

)2 6

10+

(2 −

12

10

)2 3

10

=144

1000+

24

1000+

192

1000=

360

1000=

9

25

σ =3

5

Page 171: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Have focused on distribution of one random variable, X

I A joint probability mass function describes behavior of 2discrete random variables, X and Y , at same time

I Lists probabilities for all pairs of possible values of X and Y

I Can represent as relative frequency table, joint frequencyhistogram, or formula

Page 172: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Have focused on distribution of one random variable, X

I A joint probability mass function describes behavior of 2discrete random variables, X and Y , at same time

I Lists probabilities for all pairs of possible values of X and Y

I Can represent as relative frequency table, joint frequencyhistogram, or formula

Page 173: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Have focused on distribution of one random variable, X

I A joint probability mass function describes behavior of 2discrete random variables, X and Y , at same time

I Lists probabilities for all pairs of possible values of X and Y

I Can represent as relative frequency table, joint frequencyhistogram, or formula

Page 174: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Have focused on distribution of one random variable, X

I A joint probability mass function describes behavior of 2discrete random variables, X and Y , at same time

I Lists probabilities for all pairs of possible values of X and Y

I Can represent as relative frequency table, joint frequencyhistogram, or formula

Page 175: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Have focused on distribution of one random variable, X

I A joint probability mass function describes behavior of 2discrete random variables, X and Y , at same time

I Lists probabilities for all pairs of possible values of X and Y

I Can represent as relative frequency table, joint frequencyhistogram, or formula

Page 176: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Written as P(X = x ,Y = y)

I Can also have conditional probabilities: (X = x |Y = y)

I And can use joint probability P(X = x ,Y = y) to back outmarginal probability distribution, P(X = x) or P(Y = y)

I Ex) Suppose in Boston there is relationship between floods &snowfall in a given year

Page 177: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Written as P(X = x ,Y = y)

I Can also have conditional probabilities: (X = x |Y = y)

I And can use joint probability P(X = x ,Y = y) to back outmarginal probability distribution, P(X = x) or P(Y = y)

I Ex) Suppose in Boston there is relationship between floods &snowfall in a given year

Page 178: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Written as P(X = x ,Y = y)

I Can also have conditional probabilities: (X = x |Y = y)

I And can use joint probability P(X = x ,Y = y) to back outmarginal probability distribution, P(X = x) or P(Y = y)

I Ex) Suppose in Boston there is relationship between floods &snowfall in a given year

Page 179: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Written as P(X = x ,Y = y)

I Can also have conditional probabilities: (X = x |Y = y)

I And can use joint probability P(X = x ,Y = y) to back outmarginal probability distribution, P(X = x) or P(Y = y)

I Ex) Suppose in Boston there is relationship between floods &snowfall in a given year

Page 180: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Joint Probability Distributions

I Written as P(X = x ,Y = y)

I Can also have conditional probabilities: (X = x |Y = y)

I And can use joint probability P(X = x ,Y = y) to back outmarginal probability distribution, P(X = x) or P(Y = y)

I Ex) Suppose in Boston there is relationship between floods &snowfall in a given year

Page 181: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.05 0.05 0.1 0.05 0 0.253 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

Page 182: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.05 0.05 0.1 0.05 0 0.253 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

I What is probability of 2 floods and 3 snowstorms in arandomly chosen year?

Page 183: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.05 0.05 0.1 0.05 0 0.253 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

I What is probability of 2 floods and 3 snowstorms in arandomly chosen year?

Page 184: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.05 0.05 0.1 0.05 0 0.253 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

I What is the marginal probability mass function of Y ?

Page 185: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.05 0.05 0.1 0.05 0 0.253 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

I What is the marginal probability mass function of Y ?

Page 186: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.05 0.05 0.1 0.05 0 0.253 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

I What is the conditional probability mass function of Yconditional on X = 2?

Page 187: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.05 0.05 0.1 0.05 0 0.253 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

I What is the conditional probability mass function of Yconditional on X = 2?

Page 188: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Association between floods and snowfalls

# of Snowstorms (Y)0 1 2 3 4 Total

# of Floods (X)

0 0.15 0.05 0 0 0 0.21 0.1 0.1 0.05 0 0 0.252 0.20 0.20 0.40 0.20 0 1.003 0 0.05 0.05 0.07 0.03 0.24 0 0 0 0.03 0.07 0.1

Total 0.3 0.25 0.2 0.15 0.1 1.00

I What is the conditional probability mass function of Yconditional on X = 2?

Page 189: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability Distribution Families

I We can write down some PMFs and CMFs for easy examples→ Real world much more complicated

I Fortunately, don’t have to calculate our own PMFs/CMFs forevery random variable we are interested in

I Generations of statisticians have derived generalizable PMFs,CMFs for many frequently occurring processes

I This includes processes frequently seen in social sciences/policyI Also includes processes frequently seen in natural sciences

(e.g., Normal distribution)I → Wikipedia a great resource

Page 190: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability Distribution Families

I We can write down some PMFs and CMFs for easy examples→ Real world much more complicated

I Fortunately, don’t have to calculate our own PMFs/CMFs forevery random variable we are interested in

I Generations of statisticians have derived generalizable PMFs,CMFs for many frequently occurring processes

I This includes processes frequently seen in social sciences/policyI Also includes processes frequently seen in natural sciences

(e.g., Normal distribution)I → Wikipedia a great resource

Page 191: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability Distribution Families

I We can write down some PMFs and CMFs for easy examples→ Real world much more complicated

I Fortunately, don’t have to calculate our own PMFs/CMFs forevery random variable we are interested in

I Generations of statisticians have derived generalizable PMFs,CMFs for many frequently occurring processes

I This includes processes frequently seen in social sciences/policyI Also includes processes frequently seen in natural sciences

(e.g., Normal distribution)I → Wikipedia a great resource

Page 192: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability Distribution Families

I We can write down some PMFs and CMFs for easy examples→ Real world much more complicated

I Fortunately, don’t have to calculate our own PMFs/CMFs forevery random variable we are interested in

I Generations of statisticians have derived generalizable PMFs,CMFs for many frequently occurring processes

I This includes processes frequently seen in social sciences/policyI Also includes processes frequently seen in natural sciences

(e.g., Normal distribution)I → Wikipedia a great resource

Page 193: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability Distribution Families

I We can write down some PMFs and CMFs for easy examples→ Real world much more complicated

I Fortunately, don’t have to calculate our own PMFs/CMFs forevery random variable we are interested in

I Generations of statisticians have derived generalizable PMFs,CMFs for many frequently occurring processes

I This includes processes frequently seen in social sciences/policy

I Also includes processes frequently seen in natural sciences(e.g., Normal distribution)

I → Wikipedia a great resource

Page 194: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability Distribution Families

I We can write down some PMFs and CMFs for easy examples→ Real world much more complicated

I Fortunately, don’t have to calculate our own PMFs/CMFs forevery random variable we are interested in

I Generations of statisticians have derived generalizable PMFs,CMFs for many frequently occurring processes

I This includes processes frequently seen in social sciences/policyI Also includes processes frequently seen in natural sciences

(e.g., Normal distribution)

I → Wikipedia a great resource

Page 195: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Probability Distribution Families

I We can write down some PMFs and CMFs for easy examples→ Real world much more complicated

I Fortunately, don’t have to calculate our own PMFs/CMFs forevery random variable we are interested in

I Generations of statisticians have derived generalizable PMFs,CMFs for many frequently occurring processes

I This includes processes frequently seen in social sciences/policyI Also includes processes frequently seen in natural sciences

(e.g., Normal distribution)I → Wikipedia a great resource

Page 196: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Bernoulli Distribution

I A single coin flip well-known example of one of most basicprobability distributions, a Bernoulli distribution/trial

I Need:

I A trial (e.g., coin flip) that has a probability of success (p)and a probability of failure (1 − p)

I For Bernoulli processes, the PMF:

f (x) =

{p for x = 11 − p for x = 0

I which can be rewritten as

f (x) = px(1 − p)1−x

Page 197: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Bernoulli Distribution

I A single coin flip well-known example of one of most basicprobability distributions, a Bernoulli distribution/trial

I Need:

I A trial (e.g., coin flip) that has a probability of success (p)and a probability of failure (1 − p)

I For Bernoulli processes, the PMF:

f (x) =

{p for x = 11 − p for x = 0

I which can be rewritten as

f (x) = px(1 − p)1−x

Page 198: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Bernoulli Distribution

I A single coin flip well-known example of one of most basicprobability distributions, a Bernoulli distribution/trial

I Need:

I A trial (e.g., coin flip) that has a probability of success (p)and a probability of failure (1 − p)

I For Bernoulli processes, the PMF:

f (x) =

{p for x = 11 − p for x = 0

I which can be rewritten as

f (x) = px(1 − p)1−x

Page 199: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Bernoulli Distribution

I A single coin flip well-known example of one of most basicprobability distributions, a Bernoulli distribution/trial

I Need:

I A trial (e.g., coin flip) that has a probability of success (p)and a probability of failure (1 − p)

I For Bernoulli processes, the PMF:

f (x) =

{p for x = 11 − p for x = 0

I which can be rewritten as

f (x) = px(1 − p)1−x

Page 200: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Bernoulli Distribution

I A single coin flip well-known example of one of most basicprobability distributions, a Bernoulli distribution/trial

I Need:

I A trial (e.g., coin flip) that has a probability of success (p)and a probability of failure (1 − p)

I For Bernoulli processes, the PMF:

f (x) =

{p for x = 11 − p for x = 0

I which can be rewritten as

f (x) = px(1 − p)1−x

Page 201: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Bernoulli Distribution

I A single coin flip well-known example of one of most basicprobability distributions, a Bernoulli distribution/trial

I Need:

I A trial (e.g., coin flip) that has a probability of success (p)and a probability of failure (1 − p)

I For Bernoulli processes, the PMF:

f (x) =

{p for x = 11 − p for x = 0

I which can be rewritten as

f (x) = px(1 − p)1−x

Page 202: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flipsI Need:

I Only two possible outcomes at each trial (success and failure)I Constant probability of success, p, for each trialI A fixed number of trials n that are independentI X represents the number of success in n trials

Page 203: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flipsI Need:

I Only two possible outcomes at each trial (success and failure)I Constant probability of success, p, for each trialI A fixed number of trials n that are independentI X represents the number of success in n trials

Page 204: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flips

I Need:I Only two possible outcomes at each trial (success and failure)I Constant probability of success, p, for each trialI A fixed number of trials n that are independentI X represents the number of success in n trials

Page 205: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flipsI Need:

I Only two possible outcomes at each trial (success and failure)I Constant probability of success, p, for each trialI A fixed number of trials n that are independentI X represents the number of success in n trials

Page 206: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flipsI Need:

I Only two possible outcomes at each trial (success and failure)

I Constant probability of success, p, for each trialI A fixed number of trials n that are independentI X represents the number of success in n trials

Page 207: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flipsI Need:

I Only two possible outcomes at each trial (success and failure)I Constant probability of success, p, for each trial

I A fixed number of trials n that are independentI X represents the number of success in n trials

Page 208: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flipsI Need:

I Only two possible outcomes at each trial (success and failure)I Constant probability of success, p, for each trialI A fixed number of trials n that are independent

I X represents the number of success in n trials

Page 209: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I A series of Bernoulli trial results in a binomial distribution

I Ex) Series of coin flipsI Need:

I Only two possible outcomes at each trial (success and failure)I Constant probability of success, p, for each trialI A fixed number of trials n that are independentI X represents the number of success in n trials

Page 210: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 211: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 212: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 213: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 214: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 215: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 216: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 217: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 218: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

I For a binomial process, denote X ∼ Binomial(n, p)

I Has a PMF of:

P(X = x) =

(n

x

)px(1 − p)n−x

I where(nx

)is the binomial coefficient: gives us the possible

ways of getting x successes in n trials

I(nx

)= n!

x!(n−x)!

I and n! = n × (n − 1)× (n − 2)× ...× (1)

I and a CMF of:

P(X 6 x) =∑(

n

x

)px(1 − p)n−x

Page 219: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Binomial Distribution

Page 220: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 221: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of time

I Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 222: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given year

I Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 223: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 224: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 225: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 226: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 227: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 228: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 229: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Other useful discrete families

I Poisson Distribution: X is # of events per unit of timeI Probability that 25 aviation incidents occur in a given yearI Probability that 5 MBTA buses stop at JFK bus stop in an hr

I Geometric Distribution: X is the # of Bernoulli trials neededto get one “success”

I Probability that HKS needs to ask 5 former ambassadors tojoin faculty before one says “yes”

I Probability that Senate will confirm 10 of President’s judicialappointments before it rejects a single one

I Many preprogrammed in Stata or R

I Wikipedia: Detailed explanations

Page 230: Lecture 7: Random Variables and Probability …I Introduce probability distributions, which are foundational for statistical inference I Random variables I Give examples of discrete

Next Time

I Continuous probability distributions