STA 101 Chapter Notes - Chapter Unit 2: Prior Probability, Rstudio, Unimodality

Unit 2: Probability and Distributions
Video Notes
Introduction
Random process: we know what outcomes could happen, but we don’t know which particular
will happen
o Ex: coin tosses or die rolls or shuffling on your music player
Probability
o Notation: P(A) = Probability of event A
o There are several possible interpretations of probability but they (almost) completely
agree on the mathematical rules probability must follow:
▪ PA
o Frequentist interpretation: The probability of an outcome is the proportion of times the
outcome would occur if we observed the random process an infinite number of times
o Bayesian interpretation: A Bayesian interprets probability as a subjective degree of belief
▪ Largely popularized by revolutionary advance in computational technology and
methods during the last 20 years
▪ Two people can assign it two different probabilities
▪ Allows prior knowledge to be integrated into the probability
Law of large numbers: as more observations are collected, the proportion of occurrences with a
particular outcome converges to the probability of that outcome
Ex: Say you toss a coin 10 times, and it lands on Heads each time. What is the chance that another
head will come up in the next toss?
o Answer: P(H on the 11th toss) = 0.5
o Each toss is independent, so the probability of the 11th toss does not depend on the
outcome of the 10th toss
o The coin is memory-less
o Common misunderstanding of the law of large numbers = gambler’s fallacy law of
averages)
Part 1: (1) Disjoint Events + General Addition Rule
Disjoint (mutually exclusive) events cannot happen at the same time
o Ex: the outcome of the single coin toss cannot be a head and a tail
o P(A and B) = 0
Non-disjoint events can happen at the same time
o Ex: a student can get an A in stats and an A in Econ at the same time
o PA and B ≠
Union of disjoint events – P(A or B) = P(A) + P(B)
o What is the probability of drawing a Jack or a three from a well-shuffled full deck of cards?
o P(J or 3) = P(J) + P(3) = 4/52 + 4/52
Union of non-disjoint events – P(A or B) = P(A) + P(B) – P(A and B)
o What is the probability of drawing a Jack or a red card from a well-shuffled full deck of
card?
o P(J or red) = P(J) + P(red) – P(J and red) = 4/52 + 26/52 – 2/52
Sample space: collection of all possible outcomes of a trial
o Ex: A couple has two kids. What is the sample space for the sex of these two kids?
▪ MM, FF, FM, MF
Probability Distribution: lists all possible outcomes in the sample space and the probabilities with
which they occur
find more resources at oneclass.com
find more resources at oneclass.com

o Ex: Two tosses of a coin
▪ HH – 0.25, TT – 0.25, HT – 0.25, TH – 0.25
o Rules for probability distribution
▪ 1. Events listed must be disjoint
▪ 2. Each probability must be between 0 and 1
▪ 3. The probabilities must total 1
Complementary events: two mutually exclusive events whose probabilities add up to 1
Disjoint vs. complementary
o Does the sum of probabilities of two disjoint outcomes always add up to 1?
▪ Not necessarily, there may be more than 2 outcomes in the sample space
o Does the sum of the probabilities of two complementary outcomes always add up to 1?
▪ Yes, that is the definition of complementary
Part 1: (2) Independence
Independence: two processes are independent if knowing the outcome of one provides no useful
information about the outcome of the other
o Ex: the 1st coin toss has no useful information for the 2nd coin toss = outcomes of two tosses
of a coin are independent
o Ex: Drawing a Ace out of a deck of cards and not putting it back will affect the subsequent
draws of the deck = outcomes of two draws from a deck of card (without replacement) are
dependent
o Checking for independence: P(A|B) = P(A), then A and B are independent
▪ | = given; P(A|B) = probability of A given B
Observed difference between conditional probabilities → dependence → hypothesis test
o Instead of doing a hypothesis test, we can also speculate a little
▪ If the observed difference is large, there is stronger evidence that the difference is
real
▪ If the sample size is large, even a small difference can provide strong evidence of a
real difference
If A and B are independent, P(A and B) = P(A) x P(B)
find more resources at oneclass.com
find more resources at oneclass.com

o Ex: during a coin toss, what is the probability of tossing two tails in a row
o P(two tails in a row) = P(T on first toss) x P(T on second toss) = 0.5 x 0.5 = 0.25
Part 1: (3) Probability Examples
P(agree that men have right to jobs over women) = 0.362
P(university degree or higher) = 0.138
P(agree and uni. degree) = 0.036
Is agreeing and having a university degree or higher disjoint events?
o No, because Pagree and uni. degree ≠
What is the probability that a randomly drawn person has a university degree or higher or agrees
with the statement about men having more right to a job than women?
o P(agree or uni. degree) = P(agree) + P(uni. degree) – P(agree and uni. degree) = 0.362 +
0.138 – 0.036 = 0.464
Does it appear that the event that someone agrees with the statement is independent of the event
that they have a university degree or higher?
o P(agree and uni. degree) ?=? P(agree) x P(uni. degree)
o . ≠ . → not independent
What is the probability that at least 1 in 5 randomly selected people agree with the statement
about men having more right to a job than women?
o P(agree) = 0.362
o Sample space = (0, at least 1)
o P(at least 1 agree) = 1 – P(none agree) = 1 – 0.6385 = 0.894
Part 1: (Spotlight) Disjoint vs. Independent
Disjoint events cannot happen at the same time
o P(A and B) = 0
Two processes are independent if knowing the outcome of one provides no useful information
for the outcome of the other
o P(A|B) = P(A)
Ex: Baby eyes colors = blue, green, brown disjoint events
o Disjoint events are always dependent, because we know that if one option happened, we
also know that another option cannot happen
Ex: Two babies
o We know one baby has blue eyes, then…
▪ If these two babies are related, then the events may be dependent
▪ If there two babies not related, then the events are independent
Part 2: (1) Conditional Probability
Ex: Adolescents’ Understanding of Social Class study = study examining teens’ beliefs about social
class
o Sample: 48 working class and 50 upper middle class 16-year-olds
o Study design: objective assignment to social class; subjective association based on
survey questions
Example of conditional probability: What is the probability that a student who is objectively in the
working class associates with upper middle class?
o P(subj, UMC | obj. WC) = 8/48 = 0.17
Bayes’ Theorem:
o P(A|B) = P(A and B)/P(B)
o Or P(A|B) = P(B|A) x P(A)/P(B)
find more resources at oneclass.com
find more resources at oneclass.com
Document Summary
Random process: we know what outcomes could happen, but we don"t know which particular: ex: coin tosses or die rolls or shuffling on your music player will happen. Law of large numbers: as more observations are collected, the proportion of occurrences with a particular outcome converges to the probability of that outcome. Ex: say you toss a coin 10 times, and it lands on heads each time. Part 1: (1) disjoint events + general addition rule. Non-disjoint events can happen at the same time. Union of non-disjoint events p(a or b) = p(a) + p(b) p(a and b) Sample space: collection of all possible outcomes of a trial: what is the probability of drawing a jack or a red card from a well-shuffled full deck of, ex: a couple has two kids. What is the sample space for the sex of these two kids: mm, ff, fm, mf. Each probability must be between 0 and 1: 3.