Probabilities and Sets

POLS3316, Instructor: Tom Hanna, Fall 2023, University of Houston

2023-09-26

Plan for Today

  • Next lecture:

              - Frequency distributions
              - Probability using R frequency distribution functions
  • Expectations for today:

              -Understand how probability applies to the study of political (or any) science. 
              - Understand basic assumptions/rules about probability. 
              - Be able to do relatively simple probability computations by hand. Code will be provided to them in R

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing

Hypothesis testing: checking to see if our theory about how the world works is false or more likely than not to be true

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing
  • Our ultimate goal is to know whether the correlation represented by the equation and line is meaningful

correlation: the relationship between the X and Y variables

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing

  • Our ultimate goal is to know whether the correlation represented by the equation and line is meaningful

              - We define meaningful as being *significant* to a certain *probability*

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing

  • Our ultimate goal is to know whether the correlation represented by the equation and line is meaningful

              - We define meaningful as being *significant* to a certain *probability*
              - We need *probability theory* to get there

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing

  • Our ultimate goal is to know whether the correlation represented by the equation and line is meaningful

              - We define meaningful as being *significant* to a certain *probability*
              - We need *probability theory* to get there
              - Why? There is an *element of randomness* in our data

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing

  • Our ultimate goal is to know whether the correlation represented by the equation and line is meaningful

              - We define meaningful as being *significant* to a certain *probability*
              - We need *probability theory* to get there
              - Why? There is an *element of randomness* in our data
              - Probability *models* randomness or chance

Why do we need this?

\(y = \alpha + \beta X_i + \epsilon\)

  • Probability and Frequency Distributions set the foundation for hypothesis testing

  • Our ultimate goal is to know whether the correlation represented by the equation and line is meaningful

              - We define meaningful as being *significant* to a certain *probability*
              - We need *probability theory* to get there
              - Why? There is an *element of randomness* in our data
              - Probability *models* randomness or chance
  • Statistical Significance is essentially the probability that our answer is due to randomness and not truly meaningful

What is probability?

Mathematical probability: the ratio of the cases of interest to the whole number of cases possible.

P(A) = \(\frac{possible_A}{all \; possible \; outcomes}\)

This is often phrased as ratio of “favorable outcomes” to possible outcomes, where favorable means outcomes where A occurs.

Unfortunate phrasing. Does not mean a “good” outcome.For example, in the study of war it might mean the outcomes where war occurs.

Example: Coin flip

If we call heads “favorable”

  • The ratio of
  • heads on a fair coin: 1

Example: Coin flip

If we call heads “favorable”

  • The ratio of
  • heads on a fair coin: 1
  • to the whole number of cases possible:

Example: Coin flip

If we call heads “favorable”

  • The ratio of
  • heads on a fair coin: 1
  • to the whole number of cases possible:
  • heads on a fair coin + tails on a fair coin = 2

Example: Coin flip

If we call heads “favorable”

  • The ratio of

  • heads on a fair coin: 1

  • to the whole number of cases possible:

  • heads on a fair coin + tails on a fair coin = 2

  • \(\frac{1}{2}\)

Other examples

Other examples work the same way just with more possible cases and different ratios

  • Normal fair dice:

Other examples

Other examples work the same way just with more possible cases and different ratios

  • Normal fair dice: 6 possibilities with equal chances
  • D&D dice:

Other examples

Other examples work the same way just with more possible cases and different ratios

  • Normal fair dice: 6 possibilities with equal chances
  • D&D dice: 4,6,8,12,10, 20 or 100 possibilities with equal chances
  • Kings in a deck of cards:

Other examples

Other examples work the same way just with more possible cases and different ratios

  • Normal fair dice: 6 possibilities with equal chances
  • D&D dice: 4,6,8,12,10, 20 or 100 possibilities with equal chances
  • Kings in a deck of cards: 4 favorable from 52 possibilities

Other examples

Other examples work the same way just with more possible cases and different ratios

  • Normal fair dice: 6 possibilities with equal chances
  • D&D dice: 4,6,8,12,10, 20 or 100 possibilities with equal chances
  • Kings in a deck of cards: 4 favorable from 52 possibilities
  • Other things may have unequal chances

Probability in statistical inference

We do something similar when trying to infer something about the way the world works from statistical data

Probability in statistical inference

Probability in statistical inference: Proportional times an outcome occurs if the experiment (or observation/data collection) is repeated a large number of times. (This should go on your exam notes!)

This is the frequentist interpretation. There is an important alternative definition you should be aware of, but that you are not responsible for in this class, the Bayesian interpretation

Bayesian interpretation

Bayesian probability suggests that in statistical inference, probability is a method of updating our beliefs based on new evidence. This is based on Bayes Rule, which has been called “the most important rule in data science.”

Bayes Rule

bayes rule

  • P(A|B) - This is read: The probability of A given B.

  • P(A) is our prior (existing) probability of A given no information about B.

  • In other words, if we know that B is true (given B) what is the probability that A happens.

More on Bayes Rules

https://www.freecodecamp.org/news/bayes-rule-explained/

Simplified explanation involving error rates in cancer tests: https://betterexplained.com/articles/an-intuitive-and-short-explanation-of-bayes-theorem/

Good explanation using set notation: https://www.investopedia.com/terms/p/prior_probability.asp

  • You are responsible for understanding that Bayes rule gives us a way of determining the conditional probability of something given a set of prior probabilities.
  • You also need to understand that the results are often counterintuitive at first glance. (Also, often at 2nd, 3rd, 4th…)

Some more set and probability terms

  • Sample space: S - the set of possible outcomes
  • Event: s - a subset of the sample space of any size
  • s \(\in\) S - s is an element of S
  • Empty set: \(\emptyset\) - A subset of the sample space with no elements
  • The complement of s: \(s^c\) - is all the elements of the sample space that is not s.

Set notation: Examples 1

  • S = {5,6,7,8,9,10}
  • s = {7,8}
  • \(s^c\) = {5,6,9,10}

Set notation: Examples 2

  • S = {5,6,7,8,9,10}
  • s = \(\emptyset\)
  • \(s^c\) = {5,6,7,8,9,10}

Set notation: Practice

  • S = {5,6,7,8,9,10}
  • s = {6,7,8,9,10}
  • \(s^c\) =

More notation and terms

  • Union \(\cup\) - A \(\cup\) B is all outcomes that belong to either A or B or both.
  • Intersection \(\cap\) - A \(\cap\) B is all outcomes that belong to both A and B.
  • If A \(\cap\) B = \(\emptyset\) the two sets are disjoint.

Set notation: Examples 3:

  • A = {1,2,3,4,5,6}
  • B = {5,6,7,8,9,10}
  • A \(\cup\) B = {1,2,3,4,5,6,7,8,9,10}
  • A \(\cap\) B = [5,6]

Set notation: Examples 4

  • A = {1,2,3,4,5,6,7,8,9}
  • B = {10}
  • A \(\cup\) B = {1,2,3,4,5,6,7,8,9,10}
  • A \(\cap\) B = ______

Set notation: Examples 5

  • A = {1,2,3,4,5,6}
  • B = {7,8,9}
  • C = {10}
  • D = B \(\cup\) C
  • A \(\cup\) D =

Probability assumptions and rules

  • Probability is always between zero and one

Probability assumptions and rules

  • Probability is always between zero and one
  • Each possible outcome has a probability between zero and one

Probability assumptions and rules

  • Probability is always between zero and one
  • Each possible outcome has a probability between zero and one
  • The probability that something occurs is 1

Probability assumptions and rules

  • Probability is always between zero and one
  • Each possible outcome has a probability between zero and one
  • The probability that something occurs is 1

Probability assumptions and rules

  • Probability is always between zero and one
  • Each possible outcome has a probability between zero and one
  • The probability that something occurs is 1
  • The probability that nothing occurs is 0
  • The probability of something is 1 minus the probability of its opposite

Probability assumptions and rules

  • Probability is always between zero and one
  • Each possible outcome has a probability between zero and one
  • The probability that something occurs is 1
  • The probability that nothing occurs is 0
  • The probability of something is 1 minus the probability of its opposite
  • For two mutually exclusive sets, the probability of the union of the sets is the sum of their probabilities

Probabilities of opposites

  • S = {1,2,3,4,5,6,7,8,9,10}
  • A = {1,2,3,4,5}
  • B = {6,7,8,9,10}

A & B are opposites and complements.

  • P(A) = 5 / 10
  • P(B) = 1 - (5 / 10) = 5 / 10

Probabilities Examples: 1

  • S = {Heads, Tails}
  • P(Heads) = 1 / 2
  • P(Tails) = 1 - P(Heads) = 1 / 2

Example of mutually exclusive sets:

  • S = {1,2,3,4,5,6,7,8,9,10}

  • A = {1,2,3,4,5}

  • B = {6,7,8,9,10}

  • P (A) = 5 / 10

  • P(B) = 5 / 10

  • P(A \(\cup\) B) =

What if:

  • S = {1,2,3,4,5,6,7,8,9,10}

  • A = {1,2,3,4,5,6}

  • B = {5,6,7,8,9,10}

  • P (A) = 6 / 10

  • P(B) = 6 / 10

  • P(A \(\cup\) B) =

  • B \(\cap\) A = {5,6}

  • P(B \(\cap\) A) = 2 / 10

Authorship and License

Creative Commons License