Lecture 5D: �Concentration Inequalities
Lecture 5D - Slide 1
UC Berkeley CS70
Summer 2023
Nikki Suzani
How do we bound probabilities?
Lecture 5D - Slide 2
UC Berkeley CS70 - Nikki Suzani
Option 1: Markov’s Inequality
Dealing with the definition of expectation – looking at non-negative random variables.
Lecture 4A - Slide 3
UC Berkeley CS70 - Nikki Suzani
Option 1: Markov’s Inequality
\
Emphasis: Non-Negative Random Variable
Lecture 4A - Slide 4
UC Berkeley CS70 - Nikki Suzani
Markov’s Inequality Proof
Lecture 4A - Slide 5
UC Berkeley CS70 - Nikki Suzani
Markov’s Inequality Proof
Lecture 4A - Slide 6
UC Berkeley CS70 - Nikki Suzani
What happens if we know the (negative) lower bound?
Can we still use Markov’s?
Lecture 4A - Slide 7
UC Berkeley CS70 - Nikki Suzani
Coin Tosses Example
We toss a coin with probability ⅓ of being heads n times. What is the probability of getting more than 50% heads?
Lecture 4A - Slide 8
UC Berkeley CS70 - Nikki Suzani
Cheating Chess Players
Chess Professionals take an average of 5 trips away from the board during a standard chess game. What is an upper bound on the probability that Hans Niemann takes 25 trips away?
Lecture 4A - Slide 9
UC Berkeley CS70 - Nikki Suzani
More Chess Players
Chess Professionals take an average of 5 trips away from the board during a standard chess game. What is a bound on the probability that Magnus Carlsen takes less than 2 trips away?
Lecture 4A - Slide 10
UC Berkeley CS70 - Nikki Suzani
More Chess Players
Chess Professionals take an average of 5 trips away from the board during a standard chess game. What is a bound on the probability that Magnus Carlsen takes less than 2 trips away?
Lecture 4A - Slide 11
UC Berkeley CS70 - Nikki Suzani
When is Markov’s a tight bound?
Lecture 4A - Slide 12
UC Berkeley CS70 - Nikki Suzani
Generalized Markov’s Inequality
Lecture 4A - Slide 13
UC Berkeley CS70 - Nikki Suzani
Generalized Markov’s Inequality Proof
Lecture 4A - Slide 14
Let X be an indicator variable for |Y| meaning greater than or equal to c.
UC Berkeley CS70 - Nikki Suzani
Option 2: Chebyshev’s Inequality
Variance measures the deviation from the mean – can we use that information?
Lecture 4A - Slide 15
UC Berkeley CS70 - Nikki Suzani
Option 2: Chebyshev’s Inequality (Formally)
Lecture 4A - Slide 16
UC Berkeley CS70 - Nikki Suzani
Proof of Chebyshev’s Inequality
Lecture 4A - Slide 17
UC Berkeley CS70 - Nikki Suzani
Generalized Chebyshev’s Inequality
Lecture 4A - Slide 18
UC Berkeley CS70 - Nikki Suzani
Coin Tosses Again
Lecture 4A - Slide 19
We toss a coin with probability ⅓ of being heads n times. What is the probability of getting more than 50% heads?
UC Berkeley CS70 - Nikki Suzani
Let’s talk about estimation
Say we have a coin – but don’t know the probability it flips heads. How can we guess?
Lecture 4A - Slide 20
UC Berkeley CS70 - Nikki Suzani
Let’s talk about confidence
We can’t be sure that our estimate is good, though. So we want to bound the probability that we’re wrong.
Lecture 4A - Slide 21
UC Berkeley CS70 - Nikki Suzani
Estimating Probabilities
Let’s put it into practice. How many samples do we need to be confident?
Lecture 4A - Slide 22
UC Berkeley CS70 - Nikki Suzani
Estimating Probabilities
Let’s put it into practice. How many samples do we need to be confident?
Lecture 4A - Slide 23
UC Berkeley CS70 - Nikki Suzani
Estimating Probabilities
Lecture 4A - Slide 24
UC Berkeley CS70 - Nikki Suzani
Example: How many people play chess?
We want to estimate the percent of people in CS70 who play chess. Let’s say we want an error of 0.05, and confidence of 90%. How many people do I need to sample?
Lecture 4A - Slide 25
UC Berkeley CS70 - Nikki Suzani
What about estimating a value?
Lecture 4A - Slide 26
UC Berkeley CS70 - Nikki Suzani
What about estimating a value?
Upper or lower bound on μ?
Upper or lower bound on σ?
Lecture 4A - Slide 27
UC Berkeley CS70 - Nikki Suzani
Average Rating of Chess Players on Course Staff
Many people on CS70 Course Staff play chess. Some are… better than others. Let’s say our lower bound on the mean rating is 600, and our upper bound on variance is 100. We want to be 70% confident in our guess, with an error level of 0.05. How many people do we need to ask?
Lecture 4A - Slide 28
UC Berkeley CS70 - Nikki Suzani
When is Chebyshev’s a tight bound?
Lecture 4A - Slide 29
UC Berkeley CS70 - Nikki Suzani
The Law of Large Numbers
Intuition: We expect a random variable to converge to its average.
Lecture 4A - Slide 30
UC Berkeley CS70 - Nikki Suzani
The Law of Large Numbers (Formally)
Lecture 4A - Slide 31
UC Berkeley CS70 - Nikki Suzani
Proof of LLN
Lecture 4A - Slide 32
UC Berkeley CS70 - Nikki Suzani
(If time) Derivation of Variance of the Poisson
Let X ~ Poisson(λ). What is Var(X)?
Lecture 4A - Slide 33
UC Berkeley CS70 - Nikki Suzani
Recap
Learned about Concentration Inequalities:
Learned about the Law of Large Numbers:
Lecture 4A - Slide 34
UC Berkeley CS70 - Nikki Suzani