Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats:...

438
Advanced Quantitative Research Methodology, Lecture Notes: Introduction 1 Gary King http://GKing.Harvard.edu February 2, 2014 1 c Copyright 2014 Gary King, All Rights Reserved. Gary King (Harvard) The Basics February 2, 2014 1 / 61

Transcript of Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats:...

Page 1: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Advanced Quantitative Research Methodology,Lecture Notes: Introduction1

Gary Kinghttp://GKing.Harvard.edu

February 2, 2014

1 c©Copyright 2014 Gary King, All Rights Reserved.Gary King (Harvard) The Basics February 2, 2014 1 / 61

Page 2: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Who Takes This Course?

Most Gov Dept grad students doing empirical work, the 2nd course intheir methods sequence (Gov2001)

Grad students from other departments (Gov2001)

Undergrads (Gov1002)

Non-Harvard students, visitors, faculty, & others (online through theHarvard Extension school, E-2001)

Some of the best experiences here: getting to know people in otherfields

Gary King (Harvard) The Basics 2 / 61

Page 3: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Who Takes This Course?

Most Gov Dept grad students doing empirical work, the 2nd course intheir methods sequence (Gov2001)

Grad students from other departments (Gov2001)

Undergrads (Gov1002)

Non-Harvard students, visitors, faculty, & others (online through theHarvard Extension school, E-2001)

Some of the best experiences here: getting to know people in otherfields

Gary King (Harvard) The Basics 2 / 61

Page 4: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Who Takes This Course?

Most Gov Dept grad students doing empirical work, the 2nd course intheir methods sequence (Gov2001)

Grad students from other departments (Gov2001)

Undergrads (Gov1002)

Non-Harvard students, visitors, faculty, & others (online through theHarvard Extension school, E-2001)

Some of the best experiences here: getting to know people in otherfields

Gary King (Harvard) The Basics 2 / 61

Page 5: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Who Takes This Course?

Most Gov Dept grad students doing empirical work, the 2nd course intheir methods sequence (Gov2001)

Grad students from other departments (Gov2001)

Undergrads (Gov1002)

Non-Harvard students, visitors, faculty, & others (online through theHarvard Extension school, E-2001)

Some of the best experiences here: getting to know people in otherfields

Gary King (Harvard) The Basics 2 / 61

Page 6: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Who Takes This Course?

Most Gov Dept grad students doing empirical work, the 2nd course intheir methods sequence (Gov2001)

Grad students from other departments (Gov2001)

Undergrads (Gov1002)

Non-Harvard students, visitors, faculty, & others (online through theHarvard Extension school, E-2001)

Some of the best experiences here: getting to know people in otherfields

Gary King (Harvard) The Basics 2 / 61

Page 7: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Who Takes This Course?

Most Gov Dept grad students doing empirical work, the 2nd course intheir methods sequence (Gov2001)

Grad students from other departments (Gov2001)

Undergrads (Gov1002)

Non-Harvard students, visitors, faculty, & others (online through theHarvard Extension school, E-2001)

Some of the best experiences here: getting to know people in otherfields

Gary King (Harvard) The Basics 2 / 61

Page 8: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 9: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 10: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 11: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuition

Math Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 12: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofs

Practical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 13: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 14: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depth

Use rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 15: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when needed

Insure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 16: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — always

Always traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 17: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications

Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 18: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 19: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How much math will you scare us with?

All math requires two parts: proof and concepts & intuition

Different classes emphasize:

Baby Stats: dumbed down proofs, vague intuitionMath Stats: rigorous mathematical proofsPractical Stats: deep concepts and intuition, proofs when needed

Goal: how to do empirical research, in depthUse rigorous statistical theory — when neededInsure we understand the intuition — alwaysAlways traverse from theoretical foundations to practical applications Fewer proofs, more concepts, better practical knowledge

Do you have the background for this class? A Test: What’s this?

b = (X ′X )−1X ′y

Gary King (Harvard) The Basics 3 / 61

Page 20: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 21: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 22: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methods

Inference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 23: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 24: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 25: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 26: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 27: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 28: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.

We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 29: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following along

We cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 30: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What’s this Course About?

Specific statistical methods for many research problems

How to learn (or create) new methodsInference: Using facts you know to learn about facts you don’t know

How to write a publishable scholarly paper

All the practical tools of research — theory, applications, simulation,programming, word processing, plumbing, whatever is useful

Outline and class materials:

j.mp/G2001

The syllabus gives topics, not a weekly plan.We will go as fast as possible subject to everyone following alongWe cover different amounts of material each week

Gary King (Harvard) The Basics 4 / 61

Page 31: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignments

Readings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)

Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 32: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignments

Readings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)

Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 33: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignments

Take notes, read carefully, don’t skip equations2 One “publishable” coauthored paper. (Easier than you think!)

Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 34: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)

Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 35: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)

Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 36: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awards

Undergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 37: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publications

Draft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 38: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.

See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 39: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”

You won’t be alone: you’ll work with each other and us3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 40: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 41: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:

Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 42: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.

Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 43: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> Evesdropping

Use collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 44: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)

Build class camaraderie: prepare, participate, help others4 Focus, like I will, on learning, not grades: Especially when we work on

papers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 45: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 46: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Requirements

1 Weekly assignmentsReadings, videos, assignmentsTake notes, read carefully, don’t skip equations

2 One “publishable” coauthored paper. (Easier than you think!)Many class papers have been published, presented at conferences,become dissertations or senior theses, and won many awardsUndergrads have often had professional journal publicationsDraft submission and replication exercise helps a lot.See “Publication, Publication”You won’t be alone: you’ll work with each other and us

3 Participation and collaboration:Do assignments in groups: “Cheating” is encouraged, so long as youwrite up your work on your own.Participating in a conversation >> EvesdroppingUse collaborative learning tools (we’ll introduce)Build class camaraderie: prepare, participate, help others

4 Focus, like I will, on learning, not grades: Especially when we work onpapers, I will treat you like a colleague, not a student

Gary King (Harvard) The Basics 5 / 61

Page 47: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 48: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 49: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 50: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 51: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 52: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-

ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 53: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-

rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 54: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt

me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 55: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 56: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 57: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 58: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)

Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 59: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Got Questions?

Send and respond to Email, Discussion, and Chat

We’ll assign you a suggested Study Group

Browse archive of previous years’ emails (Note which now-famousscholar is asking the question!)

In-ter-rupt me as often as necessary

(Got a dumb question? Assume you are the smartest person in classand you eventually will be!)

When are Gary’s office hours?

(Big secret: The point of office hours is to prevent students fromvisiting at other times)Come whenever you like; if you can’t find me or I’m in a meeting, comeback, talk to my assistant in the office next to me, or email any time

Gary King (Harvard) The Basics 6 / 61

Page 60: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inferenceIn your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 61: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inferenceIn your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 62: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inferenceIn your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 63: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment

1950s: The modern theory of inferenceIn your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 64: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inference

In your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 65: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inferenceIn your lifetime: Modern causal inference

Even more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 66: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inferenceIn your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 67: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inferenceIn your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 68: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the field of statistics?

An old field: statistics originates in the study of politics andgovernment: “state-istics” (circa 1662)

A new field:

mid-1930s: Experiments and random assignment1950s: The modern theory of inferenceIn your lifetime: Modern causal inferenceEven more recently: Part of a monumental societal change, “big data”,and the march of quantification through academic, professional,commercial, government and policy fields.

The number of new methods is increasing fast

Most important methods originate outside the discipline of statistics(random assignment, experimental design, survey research, machinelearning, MCMC methods, . . . ). Statistics: abstracts, proves formalproperties, generalizes, and distributes results back out.

Gary King (Harvard) The Basics 7 / 61

Page 69: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the subfield of political methodology?

A relative of other social science methods subfields — econometrics,psychological statistics, biostatistics, chemometrics, sociologicalmethodology, cliometrics, stylometry, etc. — with many cross-fieldconnections

Heavily interdisciplinary, reflecting the discipline of political scienceand that historically, political methodologists have been trained inmany different areas

The crossroads for other disciplines, and one of the best places tolearn about methods broadly.

Second largest APSA section (Valuable for the job market!)

Part of a massive change in the evidence base of the social sciences:(a) surveys, (b) end of period government stats, and (c) one-offstudies of people, places, or events numerous new types and hugequantities of (big) data

Gary King (Harvard) The Basics 8 / 61

Page 70: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the subfield of political methodology?

A relative of other social science methods subfields — econometrics,psychological statistics, biostatistics, chemometrics, sociologicalmethodology, cliometrics, stylometry, etc. — with many cross-fieldconnections

Heavily interdisciplinary, reflecting the discipline of political scienceand that historically, political methodologists have been trained inmany different areas

The crossroads for other disciplines, and one of the best places tolearn about methods broadly.

Second largest APSA section (Valuable for the job market!)

Part of a massive change in the evidence base of the social sciences:(a) surveys, (b) end of period government stats, and (c) one-offstudies of people, places, or events numerous new types and hugequantities of (big) data

Gary King (Harvard) The Basics 8 / 61

Page 71: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the subfield of political methodology?

A relative of other social science methods subfields — econometrics,psychological statistics, biostatistics, chemometrics, sociologicalmethodology, cliometrics, stylometry, etc. — with many cross-fieldconnections

Heavily interdisciplinary, reflecting the discipline of political scienceand that historically, political methodologists have been trained inmany different areas

The crossroads for other disciplines, and one of the best places tolearn about methods broadly.

Second largest APSA section (Valuable for the job market!)

Part of a massive change in the evidence base of the social sciences:(a) surveys, (b) end of period government stats, and (c) one-offstudies of people, places, or events numerous new types and hugequantities of (big) data

Gary King (Harvard) The Basics 8 / 61

Page 72: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the subfield of political methodology?

A relative of other social science methods subfields — econometrics,psychological statistics, biostatistics, chemometrics, sociologicalmethodology, cliometrics, stylometry, etc. — with many cross-fieldconnections

Heavily interdisciplinary, reflecting the discipline of political scienceand that historically, political methodologists have been trained inmany different areas

The crossroads for other disciplines, and one of the best places tolearn about methods broadly.

Second largest APSA section (Valuable for the job market!)

Part of a massive change in the evidence base of the social sciences:(a) surveys, (b) end of period government stats, and (c) one-offstudies of people, places, or events numerous new types and hugequantities of (big) data

Gary King (Harvard) The Basics 8 / 61

Page 73: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the subfield of political methodology?

A relative of other social science methods subfields — econometrics,psychological statistics, biostatistics, chemometrics, sociologicalmethodology, cliometrics, stylometry, etc. — with many cross-fieldconnections

Heavily interdisciplinary, reflecting the discipline of political scienceand that historically, political methodologists have been trained inmany different areas

The crossroads for other disciplines, and one of the best places tolearn about methods broadly.

Second largest APSA section (Valuable for the job market!)

Part of a massive change in the evidence base of the social sciences:(a) surveys, (b) end of period government stats, and (c) one-offstudies of people, places, or events numerous new types and hugequantities of (big) data

Gary King (Harvard) The Basics 8 / 61

Page 74: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is the subfield of political methodology?

A relative of other social science methods subfields — econometrics,psychological statistics, biostatistics, chemometrics, sociologicalmethodology, cliometrics, stylometry, etc. — with many cross-fieldconnections

Heavily interdisciplinary, reflecting the discipline of political scienceand that historically, political methodologists have been trained inmany different areas

The crossroads for other disciplines, and one of the best places tolearn about methods broadly.

Second largest APSA section (Valuable for the job market!)

Part of a massive change in the evidence base of the social sciences:(a) surveys, (b) end of period government stats, and (c) one-offstudies of people, places, or events numerous new types and hugequantities of (big) data

Gary King (Harvard) The Basics 8 / 61

Page 75: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods,

but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career,

but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 76: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods,

but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career,

but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 77: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career,

but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 78: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career,

but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 79: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career, but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 80: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career, but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 81: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career, but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.

We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 82: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career, but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.

The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 83: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career, but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 84: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Course strategy

We could teach you the latest and greatest methods, but when yougraduate they will be old

We could teach you all the methods that might prove useful duringyour career, but when you graduate you will be old

Instead, we teach you the fundamentals, the underlying theory ofinference, from which statistical models are developed:

We will reinvent existing methods by creating them from scratch.We will learn: its easy to invent new methods too, when needed.The fundamentals help us pick up new methods created by others.

This helps us separate the conventions from underlying statisticaltheory. (How to get an F in Econometrics: follow advice fromPsychometrics. Works in reverse too, even when the foundations areidentical.)

Gary King (Harvard) The Basics 9 / 61

Page 85: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

e.g.,: How to fit a line to a scatterplot?

visually (tends to be principle components)

a rule (least squares, least absolute deviations, etc.)

criteria (unbiasedness, efficiency, sufficiency, admissibility, etc.)

from a theory of inference, and for a substantive purpose (like causalestimation, prediction, etc.)

Gary King (Harvard) The Basics 10 / 61

Page 86: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

e.g.,: How to fit a line to a scatterplot?

visually (tends to be principle components)

a rule (least squares, least absolute deviations, etc.)

criteria (unbiasedness, efficiency, sufficiency, admissibility, etc.)

from a theory of inference, and for a substantive purpose (like causalestimation, prediction, etc.)

Gary King (Harvard) The Basics 10 / 61

Page 87: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

e.g.,: How to fit a line to a scatterplot?

visually (tends to be principle components)

a rule (least squares, least absolute deviations, etc.)

criteria (unbiasedness, efficiency, sufficiency, admissibility, etc.)

from a theory of inference, and for a substantive purpose (like causalestimation, prediction, etc.)

Gary King (Harvard) The Basics 10 / 61

Page 88: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

e.g.,: How to fit a line to a scatterplot?

visually (tends to be principle components)

a rule (least squares, least absolute deviations, etc.)

criteria (unbiasedness, efficiency, sufficiency, admissibility, etc.)

from a theory of inference, and for a substantive purpose (like causalestimation, prediction, etc.)

Gary King (Harvard) The Basics 10 / 61

Page 89: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

e.g.,: How to fit a line to a scatterplot?

visually (tends to be principle components)

a rule (least squares, least absolute deviations, etc.)

criteria (unbiasedness, efficiency, sufficiency, admissibility, etc.)

from a theory of inference, and for a substantive purpose (like causalestimation, prediction, etc.)

Gary King (Harvard) The Basics 10 / 61

Page 90: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

e.g.,: How to fit a line to a scatterplot?

visually (tends to be principle components)

a rule (least squares, least absolute deviations, etc.)

criteria (unbiasedness, efficiency, sufficiency, admissibility, etc.)

from a theory of inference, and for a substantive purpose (like causalestimation, prediction, etc.)

Gary King (Harvard) The Basics 10 / 61

Page 91: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Software options

We’ll use R — a free open source program, a commons, a movement

and an R program called Zelig (Imai, King, and Lau, 2006-14) whichsimplifies R and helps you up the steep slope fast (see j.mp/Zelig4)

Gary King (Harvard) The Basics 11 / 61

Page 92: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Software options

We’ll use R — a free open source program, a commons, a movement

and an R program called Zelig (Imai, King, and Lau, 2006-14) whichsimplifies R and helps you up the steep slope fast (see j.mp/Zelig4)

Gary King (Harvard) The Basics 11 / 61

Page 93: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Software options

We’ll use R — a free open source program, a commons, a movement

and an R program called Zelig (Imai, King, and Lau, 2006-14) whichsimplifies R and helps you up the steep slope fast (see j.mp/Zelig4)

Gary King (Harvard) The Basics 11 / 61

Page 94: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Software options

We’ll use R — a free open source program, a commons, a movement

and an R program called Zelig (Imai, King, and Lau, 2006-14) whichsimplifies R and helps you up the steep slope fast (see j.mp/Zelig4)

Gary King (Harvard) The Basics 11 / 61

Page 95: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Goal: Quantities of Interest

Gary King (Harvard) The Basics 12 / 61

Page 96: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Goal: Quantities of InterestInference (using facts you know to learn facts you don’t know) vs. summarization

Gary King (Harvard) The Basics 12 / 61

Page 97: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Goal: Quantities of InterestInference (using facts you know to learn facts you don’t know) vs. summarization

Gary King (Harvard) The Basics 12 / 61

Page 98: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 99: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 100: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 101: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 102: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 103: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 104: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 105: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is this?

Now you know what a model is. (Its an abstraction.)

Is this model true?

Are models ever true or false?

Are models ever realistic or not?

Are models ever useful or not?

Models of dirt on airplanes, vs models of aerodynamics

Gary King (Harvard) The Basics 13 / 61

Page 106: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 107: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 108: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.

yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 109: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)

Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 110: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)

Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 111: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 112: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data set

the random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 113: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 114: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 115: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variables

X = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 116: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)

A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 117: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}

Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 118: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}

X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 119: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Statistical Models: Variable Definitions

Dependent (or “outcome”) variable

Y is n × 1.yi , a number (after we know it)Yi , a random variable (before we know it)Commonly misunderstood: a “dependent variable” can be

a column of numbers in your data setthe random variable for each unit i .

Explanatory variables

aka “covariates,” “independent,” or “exogenous” variablesX = {xij} is n × k (observations by variables)A set of columns (variables): X = {x1 . . . , xk}Row (observation) i : xi = {xi1, . . . , xik}X is fixed (not random).

Gary King (Harvard) The Basics 14 / 61

Page 120: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Equivalent Linear Regression Notation

Standard version

Yi = xiβ + εi = systematic + stochastic

εi ∼ fN(0, σ2)

Alternative version

Yi ∼ fN(µi , σ2) stochastic

µi = xiβ systematic

Gary King (Harvard) The Basics 15 / 61

Page 121: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Equivalent Linear Regression Notation

Standard version

Yi = xiβ + εi = systematic + stochastic

εi ∼ fN(0, σ2)

Alternative version

Yi ∼ fN(µi , σ2) stochastic

µi = xiβ systematic

Gary King (Harvard) The Basics 15 / 61

Page 122: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Equivalent Linear Regression Notation

Standard version

Yi = xiβ + εi = systematic + stochastic

εi ∼ fN(0, σ2)

Alternative version

Yi ∼ fN(µi , σ2) stochastic

µi = xiβ systematic

Gary King (Harvard) The Basics 15 / 61

Page 123: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Equivalent Linear Regression Notation

Standard version

Yi = xiβ + εi = systematic + stochastic

εi ∼ fN(0, σ2)

Alternative version

Yi ∼ fN(µi , σ2) stochastic

µi = xiβ systematic

Gary King (Harvard) The Basics 15 / 61

Page 124: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Equivalent Linear Regression Notation

Standard version

Yi = xiβ + εi = systematic + stochastic

εi ∼ fN(0, σ2)

Alternative version

Yi ∼ fN(µi , σ2) stochastic

µi = xiβ systematic

Gary King (Harvard) The Basics 15 / 61

Page 125: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Equivalent Linear Regression Notation

Standard version

Yi = xiβ + εi = systematic + stochastic

εi ∼ fN(0, σ2)

Alternative version

Yi ∼ fN(µi , σ2) stochastic

µi = xiβ systematic

Gary King (Harvard) The Basics 15 / 61

Page 126: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Equivalent Linear Regression Notation

Standard version

Yi = xiβ + εi = systematic + stochastic

εi ∼ fN(0, σ2)

Alternative version

Yi ∼ fN(µi , σ2) stochastic

µi = xiβ systematic

Gary King (Harvard) The Basics 15 / 61

Page 127: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Understanding the Alternative Regression Notation

Is a histogram of y a test of normality?

Gary King (Harvard) The Basics 16 / 61

Page 128: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Understanding the Alternative Regression Notation

Is a histogram of y a test of normality?

Gary King (Harvard) The Basics 16 / 61

Page 129: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Understanding the Alternative Regression Notation

Is a histogram of y a test of normality?

Gary King (Harvard) The Basics 16 / 61

Page 130: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 131: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 132: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 133: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 134: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 135: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 136: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 137: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 138: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 139: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 140: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Generalized Alternative Notation for Most StatisticalModels

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

where

Yi random outcome variable

f (·) probability density

θi a systematic feature of the density that varies over i

α ancillary parameter (feature of the density constant over i)

g(·) functional form

Xi explanatory variables

β effect parameters

Gary King (Harvard) The Basics 17 / 61

Page 141: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Forms of Uncertainty

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

Estimation uncertainty: Lack of knowledge of β and α. Vanishes as ngets larger.

Fundamental uncertainty: Represented by the stochastic component.Exists no matter what the researcher does; no matter how large n is.

(If you know the model, is R2 = 1? Can you predict y perfectly?)

Gary King (Harvard) The Basics 18 / 61

Page 142: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Forms of Uncertainty

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

Estimation uncertainty: Lack of knowledge of β and α. Vanishes as ngets larger.

Fundamental uncertainty: Represented by the stochastic component.Exists no matter what the researcher does; no matter how large n is.

(If you know the model, is R2 = 1? Can you predict y perfectly?)

Gary King (Harvard) The Basics 18 / 61

Page 143: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Forms of Uncertainty

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

Estimation uncertainty: Lack of knowledge of β and α. Vanishes as ngets larger.

Fundamental uncertainty: Represented by the stochastic component.Exists no matter what the researcher does; no matter how large n is.

(If you know the model, is R2 = 1? Can you predict y perfectly?)

Gary King (Harvard) The Basics 18 / 61

Page 144: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Forms of Uncertainty

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

Estimation uncertainty: Lack of knowledge of β and α. Vanishes as ngets larger.

Fundamental uncertainty: Represented by the stochastic component.Exists no matter what the researcher does; no matter how large n is.

(If you know the model, is R2 = 1? Can you predict y perfectly?)

Gary King (Harvard) The Basics 18 / 61

Page 145: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Forms of Uncertainty

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

Estimation uncertainty: Lack of knowledge of β and α. Vanishes as ngets larger.

Fundamental uncertainty: Represented by the stochastic component.Exists no matter what the researcher does; no matter how large n is.

(If you know the model, is R2 = 1? Can you predict y perfectly?)

Gary King (Harvard) The Basics 18 / 61

Page 146: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Forms of Uncertainty

Yi ∼ f (θi , α) stochastic

θi = g(Xi , β) systematic

Estimation uncertainty: Lack of knowledge of β and α. Vanishes as ngets larger.

Fundamental uncertainty: Represented by the stochastic component.Exists no matter what the researcher does; no matter how large n is.

(If you know the model, is R2 = 1? Can you predict y perfectly?)

Gary King (Harvard) The Basics 18 / 61

Page 147: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 148: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 149: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 150: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 151: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 152: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 153: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 154: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

E (Yi ) ≡ µi = Xiβ = β0 + β1X1i + · · ·+ βkXki

Pr(Yi = 1) ≡ πi = 11+e−xiβ

V (Yi ) ≡ σ2i = exiβ

(β is an “effect parameter” vector in each, but the meaning differs.)

Each mathematical form is a class of functional forms

We choose a member of the class by setting β

Gary King (Harvard) The Basics 19 / 61

Page 155: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 156: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)

Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 157: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating β

Since data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 158: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 159: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)

the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 160: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 161: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 162: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially bias

Still get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 163: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.

May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 164: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) will

Assume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, we

Have specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 165: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Systematic Components: Examples

We (ultimately) willAssume a class of functional forms (each form is flexible and maps outmany potential relationships)Within the class, choose a member of the class by estimating βSince data contain (sampling, measurement, random) error, we will beuncertain about:

the member of the chosen family (sampling error)the chosen family (model dependence)

If the true relationship falls outside the assumed class, weHave specification error, and potentially biasStill get the best [linear,logit,etc] approximation to the correctfunctional form.May be close or far from the truth:

Gary King (Harvard) The Basics 20 / 61

Page 166: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Overview of Stochastic Components

Normal — continuous, unimodal, symmetric, unbounded

Log-normal — continuous, unimodal, skewed, bounded from below byzero

Bernoulli — discrete, binary outcomes

Poisson — discrete, countably infinite on the nonnegative integers(for counts)

Gary King (Harvard) The Basics 21 / 61

Page 167: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Overview of Stochastic Components

Normal — continuous, unimodal, symmetric, unbounded

Log-normal — continuous, unimodal, skewed, bounded from below byzero

Bernoulli — discrete, binary outcomes

Poisson — discrete, countably infinite on the nonnegative integers(for counts)

Gary King (Harvard) The Basics 21 / 61

Page 168: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Overview of Stochastic Components

Normal — continuous, unimodal, symmetric, unbounded

Log-normal — continuous, unimodal, skewed, bounded from below byzero

Bernoulli — discrete, binary outcomes

Poisson — discrete, countably infinite on the nonnegative integers(for counts)

Gary King (Harvard) The Basics 21 / 61

Page 169: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Overview of Stochastic Components

Normal — continuous, unimodal, symmetric, unbounded

Log-normal — continuous, unimodal, skewed, bounded from below byzero

Bernoulli — discrete, binary outcomes

Poisson — discrete, countably infinite on the nonnegative integers(for counts)

Gary King (Harvard) The Basics 21 / 61

Page 170: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Overview of Stochastic Components

Normal — continuous, unimodal, symmetric, unbounded

Log-normal — continuous, unimodal, skewed, bounded from below byzero

Bernoulli — discrete, binary outcomes

Poisson — discrete, countably infinite on the nonnegative integers(for counts)

Gary King (Harvard) The Basics 21 / 61

Page 171: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Overview of Stochastic Components

Normal — continuous, unimodal, symmetric, unbounded

Log-normal — continuous, unimodal, skewed, bounded from below byzero

Bernoulli — discrete, binary outcomes

Poisson — discrete, countably infinite on the nonnegative integers(for counts)

Gary King (Harvard) The Basics 21 / 61

Page 172: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 173: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 174: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 175: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 176: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 177: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependence

Our first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 178: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)

Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 179: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 180: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)

Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 181: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependence

Ameliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 182: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Choosing systematic and stochastic components

If one is bounded, so is the other

If the stochastic component is bounded, the systematic componentmust be globally nonlinear (tho possibly locally linear)

All modeling decisions are about the data generation process — howthe information made its way from the world (including how the worldproduced the data) to your data set

What if we don’t know the DGP (& we usually don’t)?

The problem: model dependenceOur first approach: make “reasonable” assumptions and check fit (&other observable implications of the assumptions)Later:

Generalize model: relax assumptions (functional form, distribution, etc)Detect model dependenceAmeliorate model dependence: preprocess data (via matching, etc.)

Gary King (Harvard) The Basics 22 / 61

Page 183: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):

1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 184: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):

1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 185: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):

1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 186: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z

2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 187: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 1

3 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 188: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 189: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 190: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 191: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 192: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 193: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Probability as a Model of Uncertainty

Pr(y |M) = Pr(data|Model), where M = (f , g ,X , β, α).

3 axioms define the function Pr(·|·):1 Pr(z) ≥ 0 for some event z2 Pr(sample space) = 13 If z1, . . . , zk are mutually exclusive events,

Pr(z1 ∪ · · · ∪ zk) = Pr(z1) + · · ·+ Pr(zk),

The first two imply 0 ≤ Pr(z) ≤ 1

Axioms are not assumptions; they can’t be wrong.

From the axioms come all rules of probability theory.

Rules can be applied analytically or via simulation.

Gary King (Harvard) The Basics 23 / 61

Page 194: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Simulation is used to:

1 solve probability problems

2 evaluate estimators

3 calculate features of probability densities

4 transform statistical results into quantities of interest

5 Empirical evidence: students get the right answer far morefrequently by using simulation than math

Gary King (Harvard) The Basics 24 / 61

Page 195: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Simulation is used to:

1 solve probability problems

2 evaluate estimators

3 calculate features of probability densities

4 transform statistical results into quantities of interest

5 Empirical evidence: students get the right answer far morefrequently by using simulation than math

Gary King (Harvard) The Basics 24 / 61

Page 196: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Simulation is used to:

1 solve probability problems

2 evaluate estimators

3 calculate features of probability densities

4 transform statistical results into quantities of interest

5 Empirical evidence: students get the right answer far morefrequently by using simulation than math

Gary King (Harvard) The Basics 24 / 61

Page 197: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Simulation is used to:

1 solve probability problems

2 evaluate estimators

3 calculate features of probability densities

4 transform statistical results into quantities of interest

5 Empirical evidence: students get the right answer far morefrequently by using simulation than math

Gary King (Harvard) The Basics 24 / 61

Page 198: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Simulation is used to:

1 solve probability problems

2 evaluate estimators

3 calculate features of probability densities

4 transform statistical results into quantities of interest

5 Empirical evidence: students get the right answer far morefrequently by using simulation than math

Gary King (Harvard) The Basics 24 / 61

Page 199: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Simulation is used to:

1 solve probability problems

2 evaluate estimators

3 calculate features of probability densities

4 transform statistical results into quantities of interest

5 Empirical evidence: students get the right answer far morefrequently by using simulation than math

Gary King (Harvard) The Basics 24 / 61

Page 200: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is simulation?

Survey Sampling Simulation

1. Learn about a populationby taking a random samplefrom it

1. Learn about a distribu-tion by taking random drawsfrom it

2. Use the random sampleto estimate a feature of thepopulation

2. Use the random draws toapproximate a feature of thedistribution

3. The estimate is arbitrarilyprecise for large n

3. The approximation is ar-bitrarily precise for large M

4. Example: estimate themean of the population

4. Example: Approximatethe mean of the distribution

Gary King (Harvard) The Basics 25 / 61

Page 201: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is simulation?

Survey Sampling Simulation

1. Learn about a populationby taking a random samplefrom it

1. Learn about a distribu-tion by taking random drawsfrom it

2. Use the random sampleto estimate a feature of thepopulation

2. Use the random draws toapproximate a feature of thedistribution

3. The estimate is arbitrarilyprecise for large n

3. The approximation is ar-bitrarily precise for large M

4. Example: estimate themean of the population

4. Example: Approximatethe mean of the distribution

Gary King (Harvard) The Basics 25 / 61

Page 202: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is simulation?

Survey Sampling Simulation

1. Learn about a populationby taking a random samplefrom it

1. Learn about a distribu-tion by taking random drawsfrom it

2. Use the random sampleto estimate a feature of thepopulation

2. Use the random draws toapproximate a feature of thedistribution

3. The estimate is arbitrarilyprecise for large n

3. The approximation is ar-bitrarily precise for large M

4. Example: estimate themean of the population

4. Example: Approximatethe mean of the distribution

Gary King (Harvard) The Basics 25 / 61

Page 203: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is simulation?

Survey Sampling Simulation

1. Learn about a populationby taking a random samplefrom it

1. Learn about a distribu-tion by taking random drawsfrom it

2. Use the random sampleto estimate a feature of thepopulation

2. Use the random draws toapproximate a feature of thedistribution

3. The estimate is arbitrarilyprecise for large n

3. The approximation is ar-bitrarily precise for large M

4. Example: estimate themean of the population

4. Example: Approximatethe mean of the distribution

Gary King (Harvard) The Basics 25 / 61

Page 204: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is simulation?

Survey Sampling Simulation

1. Learn about a populationby taking a random samplefrom it

1. Learn about a distribu-tion by taking random drawsfrom it

2. Use the random sampleto estimate a feature of thepopulation

2. Use the random draws toapproximate a feature of thedistribution

3. The estimate is arbitrarilyprecise for large n

3. The approximation is ar-bitrarily precise for large M

4. Example: estimate themean of the population

4. Example: Approximatethe mean of the distribution

Gary King (Harvard) The Basics 25 / 61

Page 205: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is simulation?

Survey Sampling Simulation

1. Learn about a populationby taking a random samplefrom it

1. Learn about a distribu-tion by taking random drawsfrom it

2. Use the random sampleto estimate a feature of thepopulation

2. Use the random draws toapproximate a feature of thedistribution

3. The estimate is arbitrarilyprecise for large n

3. The approximation is ar-bitrarily precise for large M

4. Example: estimate themean of the population

4. Example: Approximatethe mean of the distribution

Gary King (Harvard) The Basics 25 / 61

Page 206: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Simulation examples for solving probability problems

Gary King (Harvard) The Basics 26 / 61

Page 207: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

The Birthday Problem

Given a room with 24 randomly selected people, what is the probabilitythat at least two have the same birthday?

sims <- 1000

people <- 24

alldays <- seq(1, 365, 1)

sameday <- 0

for (i in 1:sims) {

room <- sample(alldays, people, replace = TRUE)

if (length(unique(room)) < people) # same birthday

sameday <- sameday+1

}

cat("Probability of >=2 people having the same birthday:", sameday/sims, "\n")

Four runs: .538, .550, .547, .524

Gary King (Harvard) The Basics 27 / 61

Page 208: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

The Birthday Problem

Given a room with 24 randomly selected people, what is the probabilitythat at least two have the same birthday?

sims <- 1000

people <- 24

alldays <- seq(1, 365, 1)

sameday <- 0

for (i in 1:sims) {

room <- sample(alldays, people, replace = TRUE)

if (length(unique(room)) < people) # same birthday

sameday <- sameday+1

}

cat("Probability of >=2 people having the same birthday:", sameday/sims, "\n")

Four runs: .538, .550, .547, .524

Gary King (Harvard) The Basics 27 / 61

Page 209: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

The Birthday Problem

Given a room with 24 randomly selected people, what is the probabilitythat at least two have the same birthday?

sims <- 1000

people <- 24

alldays <- seq(1, 365, 1)

sameday <- 0

for (i in 1:sims) {

room <- sample(alldays, people, replace = TRUE)

if (length(unique(room)) < people) # same birthday

sameday <- sameday+1

}

cat("Probability of >=2 people having the same birthday:", sameday/sims, "\n")

Four runs: .538, .550, .547, .524

Gary King (Harvard) The Basics 27 / 61

Page 210: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

The Birthday Problem

Given a room with 24 randomly selected people, what is the probabilitythat at least two have the same birthday?

sims <- 1000

people <- 24

alldays <- seq(1, 365, 1)

sameday <- 0

for (i in 1:sims) {

room <- sample(alldays, people, replace = TRUE)

if (length(unique(room)) < people) # same birthday

sameday <- sameday+1

}

cat("Probability of >=2 people having the same birthday:", sameday/sims, "\n")

Four runs: .538, .550, .547, .524

Gary King (Harvard) The Basics 27 / 61

Page 211: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

The Birthday Problem

Given a room with 24 randomly selected people, what is the probabilitythat at least two have the same birthday?

sims <- 1000

people <- 24

alldays <- seq(1, 365, 1)

sameday <- 0

for (i in 1:sims) {

room <- sample(alldays, people, replace = TRUE)

if (length(unique(room)) < people) # same birthday

sameday <- sameday+1

}

cat("Probability of >=2 people having the same birthday:", sameday/sims, "\n")

Four runs: .538, .550, .547, .524

Gary King (Harvard) The Basics 27 / 61

Page 212: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

The Birthday Problem

Given a room with 24 randomly selected people, what is the probabilitythat at least two have the same birthday?

sims <- 1000

people <- 24

alldays <- seq(1, 365, 1)

sameday <- 0

for (i in 1:sims) {

room <- sample(alldays, people, replace = TRUE)

if (length(unique(room)) < people) # same birthday

sameday <- sameday+1

}

cat("Probability of >=2 people having the same birthday:", sameday/sims, "\n")

Four runs: .538, .550, .547, .524

Gary King (Harvard) The Basics 27 / 61

Page 213: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Let’s Make a Deal

In Let’s Make a Deal, Monte Hall offers what is behind one of three doors. Behind arandom door is a car; behind the other two are goats. You choose one door at random.Monte peeks behind the other two doors and opens the one (or one of the two) with thegoat. He asks whether you’d like to switch your door with the other door that hasn’tbeen opened yet. Should you switch?

sims <- 1000

WinNoSwitch <- 0

WinSwitch <- 0

doors <- c(1, 2, 3)

for (i in 1:sims) {

WinDoor <- sample(doors, 1)

choice <- sample(doors, 1)

if (WinDoor == choice) # no switch

WinNoSwitch <- WinNoSwitch + 1

doorsLeft <- doors[doors != choice] # switch

if (any(doorsLeft == WinDoor))

WinSwitch <- WinSwitch + 1

}

cat("Prob(Car | no switch)=", WinNoSwitch/sims, "\n")

cat("Prob(Car | switch)=", WinSwitch/sims, "\n")

Gary King (Harvard) The Basics 28 / 61

Page 214: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Let’s Make a Deal

In Let’s Make a Deal, Monte Hall offers what is behind one of three doors. Behind arandom door is a car; behind the other two are goats. You choose one door at random.Monte peeks behind the other two doors and opens the one (or one of the two) with thegoat. He asks whether you’d like to switch your door with the other door that hasn’tbeen opened yet. Should you switch?

sims <- 1000

WinNoSwitch <- 0

WinSwitch <- 0

doors <- c(1, 2, 3)

for (i in 1:sims) {

WinDoor <- sample(doors, 1)

choice <- sample(doors, 1)

if (WinDoor == choice) # no switch

WinNoSwitch <- WinNoSwitch + 1

doorsLeft <- doors[doors != choice] # switch

if (any(doorsLeft == WinDoor))

WinSwitch <- WinSwitch + 1

}

cat("Prob(Car | no switch)=", WinNoSwitch/sims, "\n")

cat("Prob(Car | switch)=", WinSwitch/sims, "\n")

Gary King (Harvard) The Basics 28 / 61

Page 215: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Let’s Make a Deal

In Let’s Make a Deal, Monte Hall offers what is behind one of three doors. Behind arandom door is a car; behind the other two are goats. You choose one door at random.Monte peeks behind the other two doors and opens the one (or one of the two) with thegoat. He asks whether you’d like to switch your door with the other door that hasn’tbeen opened yet. Should you switch?

sims <- 1000

WinNoSwitch <- 0

WinSwitch <- 0

doors <- c(1, 2, 3)

for (i in 1:sims) {

WinDoor <- sample(doors, 1)

choice <- sample(doors, 1)

if (WinDoor == choice) # no switch

WinNoSwitch <- WinNoSwitch + 1

doorsLeft <- doors[doors != choice] # switch

if (any(doorsLeft == WinDoor))

WinSwitch <- WinSwitch + 1

}

cat("Prob(Car | no switch)=", WinNoSwitch/sims, "\n")

cat("Prob(Car | switch)=", WinSwitch/sims, "\n")

Gary King (Harvard) The Basics 28 / 61

Page 216: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Let’s Make a Deal

In Let’s Make a Deal, Monte Hall offers what is behind one of three doors. Behind arandom door is a car; behind the other two are goats. You choose one door at random.Monte peeks behind the other two doors and opens the one (or one of the two) with thegoat. He asks whether you’d like to switch your door with the other door that hasn’tbeen opened yet. Should you switch?

sims <- 1000

WinNoSwitch <- 0

WinSwitch <- 0

doors <- c(1, 2, 3)

for (i in 1:sims) {

WinDoor <- sample(doors, 1)

choice <- sample(doors, 1)

if (WinDoor == choice) # no switch

WinNoSwitch <- WinNoSwitch + 1

doorsLeft <- doors[doors != choice] # switch

if (any(doorsLeft == WinDoor))

WinSwitch <- WinSwitch + 1

}

cat("Prob(Car | no switch)=", WinNoSwitch/sims, "\n")

cat("Prob(Car | switch)=", WinSwitch/sims, "\n")

Gary King (Harvard) The Basics 28 / 61

Page 217: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Let’s Make a Deal

In Let’s Make a Deal, Monte Hall offers what is behind one of three doors. Behind arandom door is a car; behind the other two are goats. You choose one door at random.Monte peeks behind the other two doors and opens the one (or one of the two) with thegoat. He asks whether you’d like to switch your door with the other door that hasn’tbeen opened yet. Should you switch?

sims <- 1000

WinNoSwitch <- 0

WinSwitch <- 0

doors <- c(1, 2, 3)

for (i in 1:sims) {

WinDoor <- sample(doors, 1)

choice <- sample(doors, 1)

if (WinDoor == choice) # no switch

WinNoSwitch <- WinNoSwitch + 1

doorsLeft <- doors[doors != choice] # switch

if (any(doorsLeft == WinDoor))

WinSwitch <- WinSwitch + 1

}

cat("Prob(Car | no switch)=", WinNoSwitch/sims, "\n")

cat("Prob(Car | switch)=", WinSwitch/sims, "\n")

Gary King (Harvard) The Basics 28 / 61

Page 218: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Let’s Make a Deal

Pr(car|No Switch) Pr(car|Switch).324 .676.345 .655.320 .680.327 .673

Gary King (Harvard) The Basics 29 / 61

Page 219: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is a Probability Density?

A probability density is a function, P(Y ), such that

1 Sum over all possible Y is 1.0

For discrete Y :∑

all possibleY P(Y ) = 1

For continuous Y :∫∞−∞ P(Y )dY = 1

2 P(Y ) ≥ 0 for every Y

Gary King (Harvard) The Basics 30 / 61

Page 220: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is a Probability Density?

A probability density is a function, P(Y ), such that

1 Sum over all possible Y is 1.0

For discrete Y :∑

all possibleY P(Y ) = 1

For continuous Y :∫∞−∞ P(Y )dY = 1

2 P(Y ) ≥ 0 for every Y

Gary King (Harvard) The Basics 30 / 61

Page 221: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is a Probability Density?

A probability density is a function, P(Y ), such that

1 Sum over all possible Y is 1.0

For discrete Y :∑

all possibleY P(Y ) = 1

For continuous Y :∫∞−∞ P(Y )dY = 1

2 P(Y ) ≥ 0 for every Y

Gary King (Harvard) The Basics 30 / 61

Page 222: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is a Probability Density?

A probability density is a function, P(Y ), such that

1 Sum over all possible Y is 1.0

For discrete Y :∑

all possibleY P(Y ) = 1

For continuous Y :∫∞−∞ P(Y )dY = 1

2 P(Y ) ≥ 0 for every Y

Gary King (Harvard) The Basics 30 / 61

Page 223: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is a Probability Density?

A probability density is a function, P(Y ), such that

1 Sum over all possible Y is 1.0

For discrete Y :∑

all possibleY P(Y ) = 1

For continuous Y :∫∞−∞ P(Y )dY = 1

2 P(Y ) ≥ 0 for every Y

Gary King (Harvard) The Basics 30 / 61

Page 224: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What is a Probability Density?

A probability density is a function, P(Y ), such that

1 Sum over all possible Y is 1.0

For discrete Y :∑

all possibleY P(Y ) = 1

For continuous Y :∫∞−∞ P(Y )dY = 1

2 P(Y ) ≥ 0 for every Y

Gary King (Harvard) The Basics 30 / 61

Page 225: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Computing Probabilities from Densities

For both: Pr(a ≤ Y ≤ b) =∫ ba P(Y )dY

For discrete: Pr(y) = P(y)

For continuous: Pr(y) = 0 (why?)

Gary King (Harvard) The Basics 31 / 61

Page 226: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Computing Probabilities from Densities

For both: Pr(a ≤ Y ≤ b) =∫ ba P(Y )dY

For discrete: Pr(y) = P(y)

For continuous: Pr(y) = 0 (why?)

Gary King (Harvard) The Basics 31 / 61

Page 227: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Computing Probabilities from Densities

For both: Pr(a ≤ Y ≤ b) =∫ ba P(Y )dY

For discrete: Pr(y) = P(y)

For continuous: Pr(y) = 0 (why?)

Gary King (Harvard) The Basics 31 / 61

Page 228: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Computing Probabilities from Densities

For both: Pr(a ≤ Y ≤ b) =∫ ba P(Y )dY

For discrete: Pr(y) = P(y)

For continuous: Pr(y) = 0 (why?)

Gary King (Harvard) The Basics 31 / 61

Page 229: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What you should know about every pdf

The assignment of a probability or probability density to everyconceivable value of Yi

The first principles

How to use the final expression (but not necessarily the full derivation)

How to simulate from the density

How to compute features of the density such as its “moments”

How to verify that the final expression is indeed a proper density

Gary King (Harvard) The Basics 32 / 61

Page 230: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What you should know about every pdf

The assignment of a probability or probability density to everyconceivable value of Yi

The first principles

How to use the final expression (but not necessarily the full derivation)

How to simulate from the density

How to compute features of the density such as its “moments”

How to verify that the final expression is indeed a proper density

Gary King (Harvard) The Basics 32 / 61

Page 231: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What you should know about every pdf

The assignment of a probability or probability density to everyconceivable value of Yi

The first principles

How to use the final expression (but not necessarily the full derivation)

How to simulate from the density

How to compute features of the density such as its “moments”

How to verify that the final expression is indeed a proper density

Gary King (Harvard) The Basics 32 / 61

Page 232: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What you should know about every pdf

The assignment of a probability or probability density to everyconceivable value of Yi

The first principles

How to use the final expression (but not necessarily the full derivation)

How to simulate from the density

How to compute features of the density such as its “moments”

How to verify that the final expression is indeed a proper density

Gary King (Harvard) The Basics 32 / 61

Page 233: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What you should know about every pdf

The assignment of a probability or probability density to everyconceivable value of Yi

The first principles

How to use the final expression (but not necessarily the full derivation)

How to simulate from the density

How to compute features of the density such as its “moments”

How to verify that the final expression is indeed a proper density

Gary King (Harvard) The Basics 32 / 61

Page 234: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What you should know about every pdf

The assignment of a probability or probability density to everyconceivable value of Yi

The first principles

How to use the final expression (but not necessarily the full derivation)

How to simulate from the density

How to compute features of the density such as its “moments”

How to verify that the final expression is indeed a proper density

Gary King (Harvard) The Basics 32 / 61

Page 235: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

What you should know about every pdf

The assignment of a probability or probability density to everyconceivable value of Yi

The first principles

How to use the final expression (but not necessarily the full derivation)

How to simulate from the density

How to compute features of the density such as its “moments”

How to verify that the final expression is indeed a proper density

Gary King (Harvard) The Basics 32 / 61

Page 236: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate?

runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 237: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate?

runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 238: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate?

runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 239: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate?

runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 240: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate?

runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 241: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate?

runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 242: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate?

runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 243: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Uniform Density on the interval [0, 1]

First Principles about the process that generates Yi is such that

Yi falls in the interval [0, 1] with probability 1:∫ 10 P(y)dy = 1

Pr(Y ∈ (a, b)) = Pr(Y ∈ (c , d)) if a < b, c < d , and b − a = d − c .

Is it a pdf? How do you know?

How to simulate? runif(1000)

Gary King (Harvard) The Basics 33 / 61

Page 244: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 245: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 246: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; and

The 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 247: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 248: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 249: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 250: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πi

The parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 251: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability

=⇒ Pr(Yi = y |πi ) = πyi (1− πi )1−y

Alternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 252: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−y

Alternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 253: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Bernoulli pmf

First principles about the process that generates Yi :

Yi has 2 mutually exclusive outcomes; andThe 2 outcomes are exhaustive

In this simple case, we will compute features analytically and bysimulation.

Mathematical expression for the pmf

Pr(Yi = 1|πi ) = πi , Pr(Yi = 0|πi ) = 1− πiThe parameter π happens to be interpretable as a probability=⇒ Pr(Yi = y |πi ) = πy

i (1− πi )1−yAlternative notation: Pr(Yi = y |πi ) = Bernoulli(y |πi ) = fb(y |πi )

Gary King (Harvard) The Basics 34 / 61

Page 254: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Graphical summary of the Bernoulli

Gary King (Harvard) The Basics 35 / 61

Page 255: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 256: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 257: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 258: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 259: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 260: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 261: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 262: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 263: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 264: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Features of the Bernoulli: analytically

Expected value:

E (Y ) =∑all y

yP(y)

= 0 Pr(0) + 1 Pr(1)

= π

Variance:

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= E (Y 2)d − π2 (An easier version)

How do we compute E (Y 2)?

Gary King (Harvard) The Basics 36 / 61

Page 265: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 266: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 267: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 268: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 269: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 270: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 271: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 272: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Expected values of functions of random variables

E [g(Y )] =∑all y

g(y)P(y)

or

E [g(Y )] =

∫ ∞−∞

g(y)P(y)

For example,

E (Y 2) =∑all y

y2P(y)

= 02 Pr(0) + 12 Pr(1)

= π

Gary King (Harvard) The Basics 37 / 61

Page 273: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Variance of the Bernoulli (uses above results)

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= π − π2

= π(1− π)

This makes sense:

Gary King (Harvard) The Basics 38 / 61

Page 274: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Variance of the Bernoulli (uses above results)

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= π − π2

= π(1− π)

This makes sense:

Gary King (Harvard) The Basics 38 / 61

Page 275: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Variance of the Bernoulli (uses above results)

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= π − π2

= π(1− π)

This makes sense:

Gary King (Harvard) The Basics 38 / 61

Page 276: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Variance of the Bernoulli (uses above results)

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= π − π2

= π(1− π)

This makes sense:

Gary King (Harvard) The Basics 38 / 61

Page 277: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Variance of the Bernoulli (uses above results)

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= π − π2

= π(1− π)

This makes sense:

Gary King (Harvard) The Basics 38 / 61

Page 278: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Variance of the Bernoulli (uses above results)

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= π − π2

= π(1− π)

This makes sense:

Gary King (Harvard) The Basics 38 / 61

Page 279: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Variance of the Bernoulli (uses above results)

V (Y ) = E [(Y − E (Y ))2] (The definition)

= E (Y 2)− E (Y )2 (An easier version)

= π − π2

= π(1− π)

This makes sense:

Gary King (Harvard) The Basics 38 / 61

Page 280: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 281: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 282: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 283: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 284: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 285: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 286: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 287: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 288: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to Simulate from the Bernoulli with parameter π

take one draw u from a uniform density on the interval [0,1]

Set π to a particular value

Set y = 1 if u < π and y = 0 otherwise

In R:

sims <- 1000 # set parameters

bernpi <- 0.2

u <- runif(sims) # uniform sims

y <- as.integer(u < bernpi)

y # print results

Running the program gives:

0 0 0 1 0 0 1 1 0 0 1 1 1 0 ...

What can we do with the simulations?

Gary King (Harvard) The Basics 39 / 61

Page 289: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 290: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 291: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yN

The trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 292: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 293: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 294: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yi

Density:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 295: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 296: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 297: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:

(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 298: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 299: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 300: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 301: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 302: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Binomial Distribution

First principles:

N iid Bernoulli trials, y1, . . . , yNThe trials are independent

The trials are identically distributed

We observe Y =∑N

i=1 yiDensity:

P(Y = y |π) =

(N

y

)πy (1− π)N−y

Explanation:(Ny

)because (1 0 1) and (1 1 0) are both y = 2.

πy because y successes with π probability each (product taken due toindependence)

(1− π)N−y because N − y failures with 1− π probability each

Mean E (Y ) = Nπ

Variance V (Y ) = π(1− π)/N.

Gary King (Harvard) The Basics 40 / 61

Page 303: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to simulate from the Binomial distribution

To simulate from the Binomial(π; N):

Simulate N independent Bernoulli variables, Y1, . . . ,YN , each withparameter πAdd them up:

∑Ni=1 Yi

What can you do with the simulations?

Gary King (Harvard) The Basics 41 / 61

Page 304: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to simulate from the Binomial distribution

To simulate from the Binomial(π; N):

Simulate N independent Bernoulli variables, Y1, . . . ,YN , each withparameter πAdd them up:

∑Ni=1 Yi

What can you do with the simulations?

Gary King (Harvard) The Basics 41 / 61

Page 305: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to simulate from the Binomial distribution

To simulate from the Binomial(π; N):

Simulate N independent Bernoulli variables, Y1, . . . ,YN , each withparameter π

Add them up:∑N

i=1 Yi

What can you do with the simulations?

Gary King (Harvard) The Basics 41 / 61

Page 306: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to simulate from the Binomial distribution

To simulate from the Binomial(π; N):

Simulate N independent Bernoulli variables, Y1, . . . ,YN , each withparameter πAdd them up:

∑Ni=1 Yi

What can you do with the simulations?

Gary King (Harvard) The Basics 41 / 61

Page 307: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

How to simulate from the Binomial distribution

To simulate from the Binomial(π; N):

Simulate N independent Bernoulli variables, Y1, . . . ,YN , each withparameter πAdd them up:

∑Ni=1 Yi

What can you do with the simulations?

Gary King (Harvard) The Basics 41 / 61

Page 308: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Where to get uniform random numbers

Random is not haphazard (e.g., Benford’s law)

Random number generators are perfectly predictable (what?)

We use pseudo-random numbers which have (a) digits that occurwith 1/10th probability, (b) no time series patterns, etc.

How to create real random numbers?

Some chips now use quantum effects

Gary King (Harvard) The Basics 42 / 61

Page 309: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Where to get uniform random numbers

Random is not haphazard (e.g., Benford’s law)

Random number generators are perfectly predictable (what?)

We use pseudo-random numbers which have (a) digits that occurwith 1/10th probability, (b) no time series patterns, etc.

How to create real random numbers?

Some chips now use quantum effects

Gary King (Harvard) The Basics 42 / 61

Page 310: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Where to get uniform random numbers

Random is not haphazard (e.g., Benford’s law)

Random number generators are perfectly predictable (what?)

We use pseudo-random numbers which have (a) digits that occurwith 1/10th probability, (b) no time series patterns, etc.

How to create real random numbers?

Some chips now use quantum effects

Gary King (Harvard) The Basics 42 / 61

Page 311: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Where to get uniform random numbers

Random is not haphazard (e.g., Benford’s law)

Random number generators are perfectly predictable (what?)

We use pseudo-random numbers which have (a) digits that occurwith 1/10th probability, (b) no time series patterns, etc.

How to create real random numbers?

Some chips now use quantum effects

Gary King (Harvard) The Basics 42 / 61

Page 312: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Where to get uniform random numbers

Random is not haphazard (e.g., Benford’s law)

Random number generators are perfectly predictable (what?)

We use pseudo-random numbers which have (a) digits that occurwith 1/10th probability, (b) no time series patterns, etc.

How to create real random numbers?

Some chips now use quantum effects

Gary King (Harvard) The Basics 42 / 61

Page 313: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Where to get uniform random numbers

Random is not haphazard (e.g., Benford’s law)

Random number generators are perfectly predictable (what?)

We use pseudo-random numbers which have (a) digits that occurwith 1/10th probability, (b) no time series patterns, etc.

How to create real random numbers?

Some chips now use quantum effects

Gary King (Harvard) The Basics 42 / 61

Page 314: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 315: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 316: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 317: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 318: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 319: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 320: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 321: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Discretization for random draws from discrete pmfs

Divide up PDF into a grid

Approximate probabilities by trapezoids

Map [0,1] uniform draws to the proportion area in each trapezoid

Return midpoint of each trapezoid

More trapezoids better approximation

(Works for a few dimensions, but Infeasible for many)

Gary King (Harvard) The Basics 43 / 61

Page 322: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Inverse CDF: drawing from arbitrary continuous pdfs

From the pdf f (Y ), compute the cdf:Pr(Y ≤ y) ≡ F (y) =

∫ y−∞ f (z)dz

Define the inverse cdf F−1(y), such that F−1[F (y)] = y

Draw random uniform number, U

Then F−1(U) gives a random draw from f (Y ).

Gary King (Harvard) The Basics 44 / 61

Page 323: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Inverse CDF: drawing from arbitrary continuous pdfs

From the pdf f (Y ), compute the cdf:Pr(Y ≤ y) ≡ F (y) =

∫ y−∞ f (z)dz

Define the inverse cdf F−1(y), such that F−1[F (y)] = y

Draw random uniform number, U

Then F−1(U) gives a random draw from f (Y ).

Gary King (Harvard) The Basics 44 / 61

Page 324: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Inverse CDF: drawing from arbitrary continuous pdfs

From the pdf f (Y ), compute the cdf:Pr(Y ≤ y) ≡ F (y) =

∫ y−∞ f (z)dz

Define the inverse cdf F−1(y), such that F−1[F (y)] = y

Draw random uniform number, U

Then F−1(U) gives a random draw from f (Y ).

Gary King (Harvard) The Basics 44 / 61

Page 325: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Inverse CDF: drawing from arbitrary continuous pdfs

From the pdf f (Y ), compute the cdf:Pr(Y ≤ y) ≡ F (y) =

∫ y−∞ f (z)dz

Define the inverse cdf F−1(y), such that F−1[F (y)] = y

Draw random uniform number, U

Then F−1(U) gives a random draw from f (Y ).

Gary King (Harvard) The Basics 44 / 61

Page 326: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Inverse CDF: drawing from arbitrary continuous pdfs

From the pdf f (Y ), compute the cdf:Pr(Y ≤ y) ≡ F (y) =

∫ y−∞ f (z)dz

Define the inverse cdf F−1(y), such that F−1[F (y)] = y

Draw random uniform number, U

Then F−1(U) gives a random draw from f (Y ).

Gary King (Harvard) The Basics 44 / 61

Page 327: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Using Inverse CDF to Improve Discretization Method

Refined Discretization Method:

Choose interval randomly as above (based on area in trapezoids)Draw a number within each trapeaoid by the inverse CDF methodapplied to the trapezoidal approximation.

Drawing random numbers from arbitrary multivariate densities: nowan enormous literature

Gary King (Harvard) The Basics 45 / 61

Page 328: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Using Inverse CDF to Improve Discretization Method

Refined Discretization Method:

Choose interval randomly as above (based on area in trapezoids)Draw a number within each trapeaoid by the inverse CDF methodapplied to the trapezoidal approximation.

Drawing random numbers from arbitrary multivariate densities: nowan enormous literature

Gary King (Harvard) The Basics 45 / 61

Page 329: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Using Inverse CDF to Improve Discretization Method

Refined Discretization Method:

Choose interval randomly as above (based on area in trapezoids)

Draw a number within each trapeaoid by the inverse CDF methodapplied to the trapezoidal approximation.

Drawing random numbers from arbitrary multivariate densities: nowan enormous literature

Gary King (Harvard) The Basics 45 / 61

Page 330: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Using Inverse CDF to Improve Discretization Method

Refined Discretization Method:

Choose interval randomly as above (based on area in trapezoids)Draw a number within each trapeaoid by the inverse CDF methodapplied to the trapezoidal approximation.

Drawing random numbers from arbitrary multivariate densities: nowan enormous literature

Gary King (Harvard) The Basics 45 / 61

Page 331: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Using Inverse CDF to Improve Discretization Method

Refined Discretization Method:

Choose interval randomly as above (based on area in trapezoids)Draw a number within each trapeaoid by the inverse CDF methodapplied to the trapezoidal approximation.

Drawing random numbers from arbitrary multivariate densities: nowan enormous literature

Gary King (Harvard) The Basics 45 / 61

Page 332: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 333: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 334: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 335: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 336: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 337: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 338: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 339: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)

Gary King (Harvard) The Basics 46 / 61

Page 340: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Normal Distribution

Many different first principles

A common one is the central limit theorem

The univariate normal density (with mean µi , variance σ2)

N(yi |µi , σ2) = (2πσ2)−1/2 exp

(−(yi − µi )2

2σ2

)

The stylized normal: fstn(yi |µi ) = N(y |µi , 1)

fstn(y |µi ) = (2π)−1/2 exp

(−(yi − µi )2

2

)

The standardized normal: fsn(yi ) = N(yi |0, 1) = φ(yi )

fsn(yi ) = (2π)−1/2 exp

(−y2i

2

)Gary King (Harvard) The Basics 46 / 61

Page 341: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 342: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 343: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 344: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 345: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 346: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 347: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 348: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Let Yi ≡ {Y1i , . . . ,Yki} be a k × 1 vector, jointly random:

Yi ∼ N(yi |µi ,Σ)

where µi is k × 1 and Σ is k × k . For k = 2,

µi =

(µ1iµ2i

)Σ =

(σ21 σ12σ12 σ22

)

Mathematical form:

N(yi |µi ,Σ) = (2π)−k/2|Σ|−1/2 exp

[−1

2(yi − µi )′Σ−1(yi − µi )

]

Simulating once from this density produces k numbers. Specialalgorithms are used to generate normal random variates (in R,mvrnorm(), from the MASS library).

Gary King (Harvard) The Basics 47 / 61

Page 349: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Moments: E (Y ) = µi , V (Y ) = Σ, Cov(Y1,Y2) = σ12 = σ21.

Corr(Y1,Y2) = σ12σ1σ2

Marginals:

N(Y1|µ1, σ21) =

∫ ∞−∞· · ·∫ ∞−∞

N(yi |µi ,Σ)dy2dy3 · · · dyk

Gary King (Harvard) The Basics 48 / 61

Page 350: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Moments: E (Y ) = µi , V (Y ) = Σ, Cov(Y1,Y2) = σ12 = σ21.

Corr(Y1,Y2) = σ12σ1σ2

Marginals:

N(Y1|µ1, σ21) =

∫ ∞−∞· · ·∫ ∞−∞

N(yi |µi ,Σ)dy2dy3 · · · dyk

Gary King (Harvard) The Basics 48 / 61

Page 351: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Multivariate Normal Distribution

Moments: E (Y ) = µi , V (Y ) = Σ, Cov(Y1,Y2) = σ12 = σ21.

Corr(Y1,Y2) = σ12σ1σ2

Marginals:

N(Y1|µ1, σ21) =

∫ ∞−∞· · ·∫ ∞−∞

N(yi |µi ,Σ)dy2dy3 · · · dyk

Gary King (Harvard) The Basics 48 / 61

Page 352: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Truncated bivariate normal examples (for βb and βw)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1

02

46

8

(a) 0.5 0.5 0.15 0.15 0

βbi

βwi

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1

02

46

8

(b) 0.1 0.9 0.15 0.15 0

βbi

βwi

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1

0.1

0.2

0.3

0.4

0.5

0.6

(c) 0.8 0.8 0.6 0.6 0.5

βbi

βwi

Parameters are µ1, µ2, σ1, σ2, and ρ.

Gary King (Harvard) The Basics 49 / 61

Page 353: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Stop here

We will stop here this year and skip to the next set of slides.Please refer to the slides below for further information on probabilitydensities and random number generation; they offer more sophisticated .

Gary King (Harvard) The Basics 50 / 61

Page 354: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta (continuous) density

Used to model proportions.

We’ll use it first to generalize the Binomial distribution

y falls in the interval [0,1]

Takes on a variety of flexible forms, depending on the parametervalues:

Gary King (Harvard) The Basics 51 / 61

Page 355: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta (continuous) density

Used to model proportions.

We’ll use it first to generalize the Binomial distribution

y falls in the interval [0,1]

Takes on a variety of flexible forms, depending on the parametervalues:

Gary King (Harvard) The Basics 51 / 61

Page 356: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta (continuous) density

Used to model proportions.

We’ll use it first to generalize the Binomial distribution

y falls in the interval [0,1]

Takes on a variety of flexible forms, depending on the parametervalues:

Gary King (Harvard) The Basics 51 / 61

Page 357: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta (continuous) density

Used to model proportions.

We’ll use it first to generalize the Binomial distribution

y falls in the interval [0,1]

Takes on a variety of flexible forms, depending on the parametervalues:

Gary King (Harvard) The Basics 51 / 61

Page 358: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta (continuous) density

Used to model proportions.

We’ll use it first to generalize the Binomial distribution

y falls in the interval [0,1]

Takes on a variety of flexible forms, depending on the parametervalues:

Gary King (Harvard) The Basics 51 / 61

Page 359: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta (continuous) density

Used to model proportions.

We’ll use it first to generalize the Binomial distribution

y falls in the interval [0,1]

Takes on a variety of flexible forms, depending on the parametervalues:

Gary King (Harvard) The Basics 51 / 61

Page 360: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 361: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 362: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 363: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 364: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 365: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 366: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive?

The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 367: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 368: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 369: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Standard Parameterization

Beta(y |α, β) =Γ(α + β)

Γ(α)Γ(β)yα−1(1− y)β−1

where, Γ(x) is the gamma function:

Γ(x) =

∫ ∞0

zx−1e−zdz

For integer values of x , Γ(x + 1) = x! = x(x − 1)(x − 2) · · · 1.

Non-integer values of x produce a continuous interpolation. In R or gauss:gamma(x);

Intuitive? The moments help some:

E (Y ) = α(α+β)

V (Y ) = αβ(α+β)2(α+β+1)

Gary King (Harvard) The Basics 52 / 61

Page 370: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β) and µ(1−µ)γ

(1+γ) = V (Y ) = αβ(α+β)2(α+β+1)

, solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 371: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β)

and µ(1−µ)γ(1+γ) = V (Y ) = αβ

(α+β)2(α+β+1), solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 372: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β) and µ(1−µ)γ

(1+γ) = V (Y ) = αβ(α+β)2(α+β+1)

,

solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 373: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β) and µ(1−µ)γ

(1+γ) = V (Y ) = αβ(α+β)2(α+β+1)

, solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 374: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β) and µ(1−µ)γ

(1+γ) = V (Y ) = αβ(α+β)2(α+β+1)

, solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 375: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β) and µ(1−µ)γ

(1+γ) = V (Y ) = αβ(α+β)2(α+β+1)

, solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 376: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β) and µ(1−µ)γ

(1+γ) = V (Y ) = αβ(α+β)2(α+β+1)

, solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 377: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Alternative parameterization

Set µ = E (Y ) = α(α+β) and µ(1−µ)γ

(1+γ) = V (Y ) = αβ(α+β)2(α+β+1)

, solve for α

and β and substitute in.

Result:

beta(y |µ, γ) =Γ(µγ−1 + (1− µ)γ−1

)Γ (µγ−1) Γ [(1− µ)γ−1]

yµγ−1−1(1− y)(1−µ)γ

−1−1

where now E (Y ) = µ and γ is an index of variation that varies with µ.

Reparameterization like this will be key throughout the course.

Gary King (Harvard) The Basics 53 / 61

Page 378: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 379: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 380: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 381: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 382: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 383: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 384: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 385: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 386: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial

Useful if the binomial variance is not approximately π(1− π)/N.

How to simulate

(First principles are easy to see from this too.)

Begin with N Bernoulli trials with parameter πj , j = 1, . . . ,N (notnecessarily independent or identically distributed)

Choose µ = E (πj) and γ

Draw π̃ from Beta(π|µ, γ) (without this step we get Binomial draws)

Draw N Bernoulli variables z̃j (j = 1, . . . ,N) from Bernoulli(zj |π̃)

Add up the z̃ ’s to get y =∑N

j z̃j , which is a draw from thebeta-binomial.

Gary King (Harvard) The Basics 54 / 61

Page 387: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 388: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 389: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 390: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 391: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 392: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 393: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 394: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 395: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 396: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 397: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Beta-Binomial Analytics

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B) Pr(B)

Plan:

Derive the joint density of y and π. Then

Average over the unknown π dimension

Hence, the beta-binomial (or extended beta-binomial):

BB(yi |µ, γ) =

∫ 1

0

Binomial(yi |π)× Beta(π|µ, γ)dπ

=

∫ 1

0

P(yi , π|µ, γ)dπ

=N!

yi !(N − yi )!

yi−1∏j=0

(µ+ γj)

N−yi−1∏j=0

(1− µ+ γj)N−1∏j=0

(1 + γj)

Gary King (Harvard) The Basics 55 / 61

Page 398: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 399: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 400: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 401: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 402: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 403: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 404: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 405: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

Begin with an observation period:

All assumptions are about the events that occur between the startand when we observe the count. The process of event generation isassumed not observed.

0 events occur at the start of the period

Only observe number of events at the end of the period

No 2 events can occur at the same time

Pr(event at time t | all events up to time t − 1) is constant for all t.

Gary King (Harvard) The Basics 56 / 61

Page 406: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

First principles imply:

Poisson(y |λ) =

{e−λλyi

yi !for yi = 0, 1, . . .

0 otherwise

E (Y ) = λV (Y ) = λThat the variance goes up with the mean makes sense, but should theybe equal?

Gary King (Harvard) The Basics 57 / 61

Page 407: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

First principles imply:

Poisson(y |λ) =

{e−λλyi

yi !for yi = 0, 1, . . .

0 otherwise

E (Y ) = λ

V (Y ) = λThat the variance goes up with the mean makes sense, but should theybe equal?

Gary King (Harvard) The Basics 57 / 61

Page 408: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

First principles imply:

Poisson(y |λ) =

{e−λλyi

yi !for yi = 0, 1, . . .

0 otherwise

E (Y ) = λV (Y ) = λ

That the variance goes up with the mean makes sense, but should theybe equal?

Gary King (Harvard) The Basics 57 / 61

Page 409: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

First principles imply:

Poisson(y |λ) =

{e−λλyi

yi !for yi = 0, 1, . . .

0 otherwise

E (Y ) = λV (Y ) = λThat the variance goes up with the mean makes sense, but should theybe equal?

Gary King (Harvard) The Basics 57 / 61

Page 410: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

First principles imply:

Poisson(y |λ) =

{e−λλyi

yi !for yi = 0, 1, . . .

0 otherwise

E (Y ) = λV (Y ) = λThat the variance goes up with the mean makes sense, but should theybe equal?

Gary King (Harvard) The Basics 57 / 61

Page 411: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

If we assume Poisson dispersion, but Y |X is over-dispersed, standarderrors are too small.If we assume Poisson dispersion, but Y |X is under-dispersed, standarderrors are too large.

How to simulate? We’ll use canned random number generators.

Gary King (Harvard) The Basics 58 / 61

Page 412: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

If we assume Poisson dispersion, but Y |X is over-dispersed, standarderrors are too small.

If we assume Poisson dispersion, but Y |X is under-dispersed, standarderrors are too large.

How to simulate? We’ll use canned random number generators.

Gary King (Harvard) The Basics 58 / 61

Page 413: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

If we assume Poisson dispersion, but Y |X is over-dispersed, standarderrors are too small.If we assume Poisson dispersion, but Y |X is under-dispersed, standarderrors are too large.

How to simulate? We’ll use canned random number generators.

Gary King (Harvard) The Basics 58 / 61

Page 414: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Poisson Distribution

If we assume Poisson dispersion, but Y |X is over-dispersed, standarderrors are too small.If we assume Poisson dispersion, but Y |X is under-dispersed, standarderrors are too large.

How to simulate? We’ll use canned random number generators.

Gary King (Harvard) The Basics 58 / 61

Page 415: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Gamma Density

Used to model durations and other nonnegative variables

We’ll use first to generalize the Poisson

Parameters: φ > 0 is the mean and σ2 > 1 is an index of variability.

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = φ(σ2 − 1)

gamma(y |φ, σ2) =yφ(σ

2−1)−1−1e−y(σ2−1)−1

Γ[φ(σ2 − 1)−1](σ2 − 1)φ(σ2−1)−1

Gary King (Harvard) The Basics 59 / 61

Page 416: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Gamma Density

Used to model durations and other nonnegative variables

We’ll use first to generalize the Poisson

Parameters: φ > 0 is the mean and σ2 > 1 is an index of variability.

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = φ(σ2 − 1)

gamma(y |φ, σ2) =yφ(σ

2−1)−1−1e−y(σ2−1)−1

Γ[φ(σ2 − 1)−1](σ2 − 1)φ(σ2−1)−1

Gary King (Harvard) The Basics 59 / 61

Page 417: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Gamma Density

Used to model durations and other nonnegative variables

We’ll use first to generalize the Poisson

Parameters: φ > 0 is the mean and σ2 > 1 is an index of variability.

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = φ(σ2 − 1)

gamma(y |φ, σ2) =yφ(σ

2−1)−1−1e−y(σ2−1)−1

Γ[φ(σ2 − 1)−1](σ2 − 1)φ(σ2−1)−1

Gary King (Harvard) The Basics 59 / 61

Page 418: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Gamma Density

Used to model durations and other nonnegative variables

We’ll use first to generalize the Poisson

Parameters: φ > 0 is the mean and σ2 > 1 is an index of variability.

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = φ(σ2 − 1)

gamma(y |φ, σ2) =yφ(σ

2−1)−1−1e−y(σ2−1)−1

Γ[φ(σ2 − 1)−1](σ2 − 1)φ(σ2−1)−1

Gary King (Harvard) The Basics 59 / 61

Page 419: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Gamma Density

Used to model durations and other nonnegative variables

We’ll use first to generalize the Poisson

Parameters: φ > 0 is the mean and σ2 > 1 is an index of variability.

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = φ(σ2 − 1)

gamma(y |φ, σ2) =yφ(σ

2−1)−1−1e−y(σ2−1)−1

Γ[φ(σ2 − 1)−1](σ2 − 1)φ(σ2−1)−1

Gary King (Harvard) The Basics 59 / 61

Page 420: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Gamma Density

Used to model durations and other nonnegative variables

We’ll use first to generalize the Poisson

Parameters: φ > 0 is the mean and σ2 > 1 is an index of variability.

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = φ(σ2 − 1)

gamma(y |φ, σ2) =yφ(σ

2−1)−1−1e−y(σ2−1)−1

Γ[φ(σ2 − 1)−1](σ2 − 1)φ(σ2−1)−1

Gary King (Harvard) The Basics 59 / 61

Page 421: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Gamma Density

Used to model durations and other nonnegative variables

We’ll use first to generalize the Poisson

Parameters: φ > 0 is the mean and σ2 > 1 is an index of variability.

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = φ(σ2 − 1)

gamma(y |φ, σ2) =yφ(σ

2−1)−1−1e−y(σ2−1)−1

Γ[φ(σ2 − 1)−1](σ2 − 1)φ(σ2−1)−1

Gary King (Harvard) The Basics 59 / 61

Page 422: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 423: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 424: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 425: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and

variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 426: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 427: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 428: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 429: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 430: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 431: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 432: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial

Same logic as the beta-binomial generalization of the binomial

Parameters φ > 0 and dispersion parameter σ2 > 1

Moments: mean E (Y ) = φ > 0 and variance V (Y ) = σ2φ

Allows over-dispersion: V (Y ) > E (Y ).

As σ2 → 1, NegBin(y |φ, σ2)→ Poisson(y |φ) (i.e., small σ2 makesthe variation from the gamma vanish)

How to simulate (and first principles)

Choose E (Y ) = φ and σ2

Draw λ̃ from gamma(λ|φ, σ2).

Draw Y from Poisson(y |λ̃), which gives one draw from the negativebinomial.

Gary King (Harvard) The Basics 60 / 61

Page 433: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial Derivation

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B)Pr(B)

NegBin(y |φ, σ2) =

∫ ∞0

Poisson(y |λ)× gamma(λ|φ, σ2)dλ

=

∫ ∞0

P(y , λ|φ, σ2)dλ

=Γ(

φσ2−1 + yi

)yi !Γ

σ2−1

) (σ2 − 1

σ2

)yi (σ2) −φ

σ2−1

Gary King (Harvard) The Basics 61 / 61

Page 434: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial Derivation

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B)Pr(B)

NegBin(y |φ, σ2) =

∫ ∞0

Poisson(y |λ)× gamma(λ|φ, σ2)dλ

=

∫ ∞0

P(y , λ|φ, σ2)dλ

=Γ(

φσ2−1 + yi

)yi !Γ

σ2−1

) (σ2 − 1

σ2

)yi (σ2) −φ

σ2−1

Gary King (Harvard) The Basics 61 / 61

Page 435: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial Derivation

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B)Pr(B)

NegBin(y |φ, σ2) =

∫ ∞0

Poisson(y |λ)× gamma(λ|φ, σ2)dλ

=

∫ ∞0

P(y , λ|φ, σ2)dλ

=Γ(

φσ2−1 + yi

)yi !Γ

σ2−1

) (σ2 − 1

σ2

)yi (σ2) −φ

σ2−1

Gary King (Harvard) The Basics 61 / 61

Page 436: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial Derivation

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B)Pr(B)

NegBin(y |φ, σ2) =

∫ ∞0

Poisson(y |λ)× gamma(λ|φ, σ2)dλ

=

∫ ∞0

P(y , λ|φ, σ2)dλ

=Γ(

φσ2−1 + yi

)yi !Γ

σ2−1

) (σ2 − 1

σ2

)yi (σ2) −φ

σ2−1

Gary King (Harvard) The Basics 61 / 61

Page 437: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial Derivation

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B)Pr(B)

NegBin(y |φ, σ2) =

∫ ∞0

Poisson(y |λ)× gamma(λ|φ, σ2)dλ

=

∫ ∞0

P(y , λ|φ, σ2)dλ

=Γ(

φσ2−1 + yi

)yi !Γ

σ2−1

) (σ2 − 1

σ2

)yi (σ2) −φ

σ2−1

Gary King (Harvard) The Basics 61 / 61

Page 438: Advanced Quantitative Research Methodology, › files › gov2001 › files › ...Practical Stats: deep concepts and intuition, proofs when needed Goal: how to do empirical research,

Negative Binomial Derivation

Recall:

Pr(A|B) =Pr(AB)

Pr(B)=⇒ Pr(AB) = Pr(A|B)Pr(B)

NegBin(y |φ, σ2) =

∫ ∞0

Poisson(y |λ)× gamma(λ|φ, σ2)dλ

=

∫ ∞0

P(y , λ|φ, σ2)dλ

=Γ(

φσ2−1 + yi

)yi !Γ

σ2−1

) (σ2 − 1

σ2

)yi (σ2) −φ

σ2−1

Gary King (Harvard) The Basics 61 / 61