Linearity of Expectations

MIT OpenCourseWare · Intermediate ·🔍 RAG & Vector Search ·1y ago

Key Takeaways

The video discusses the concept of linearity of expectations in probability theory and its application in combinatorial problems, specifically in proving the existence of tournaments with a large number of Hamilton paths. The instructor uses the probabilistic method to demonstrate how linearity of expectations can be used to derive interesting consequences in combinatorics.

Full Transcript

in this video let us look at a basic yet important Concept in probability known as linearity of expectations and use it to deduce some interesting consequences in combinatorics via the probabilistic method linearity of expectations set that if you're given random variables X1 through XM and constants C1 through CM then when we took it when we take a linear combination of these random variables as such so C1 * X1 so imagine these are real valued random variables and these are real constants for instance then the sum of these uh C1 * X1 plus C2 * X2 and so on Plus CN * XM so this sum has expectation the following which can be computed by Distributing this expectation symbol across to the individual variables so this is a basic and important property and it's worth noting that a similar statement written for products is often not true so it is not usually the case that the expectation of a product of two random variables is the product of their expectations unless you're in some special circumstances such as when X and Y are independent or uncorrelated okay anyway let us focus on the linearity of expectations and see some ways to use this in combinatorial applications and the first example is the following question which will be able to give a very quick and clean answer the question is what is the average number of fixed points of a permutation of 1 through n chosen uniformly at random as a reminder if we have numbers 1 2 3 4 here n equals to 4 then a permutation can be thought as some way to map these numbers the sets back to themselves in one to one correspondence and a fixed point is some number that gets mapped back back to themselves so in this permutation there are exactly two fixed points okay great let's answer this question using linearity of expectations well one way to think about the problem is that well there are n factorial permutations and maybe we want to try to go about counting how many of them have zero fixed points how many of them have one fixed points how many have two fixed points but that method can get pretty cumbersome and pretty difficult quite quickly however if we look at this problem through the lens of linearity of expectations there turns out to be a very quick solution and the method is to let introduce some random variables let X I be a random variable that equals to one if I is a fixed Point meaning that in this permutation I gets mapped to itself and zero otherwise so X of I is the indicator random variable for the element I being a fixed point of this random permutation what's the expectation of XI well this is the probability that I is a fixed point well this being a uniform permutation chosen uniformly at random I is sent to each of the elements 1 through n with equal probabilities so in particular it is sent back to itself with probability 1 / n and then the number of fixed points equals to the sum of the X XIs so X1 plus X2 so on to xn and now we can take expectation of both sides and apply linearity of expectations and see that while each individual term is 1 / n and there are n such terms so the answer is one and that is the answer to this question so the average number of fixed points of a permutation chosen uniformly at random is exactly one and you see that there's a very quick calculation once you get a hang of the idea of of linearity of expectations let us look at a slightly more interesting example and for this example we'll consider the concept of a tournament okay so a tournament is a concept in graph Theory referring to the following there are nend vertices think of nend players in some tournament and between every pair of vertices we have some directed Edge pointing in one of these two directions so every pair of vertices there's some Edge pointing to one of the two directions okay so that's an example of a tournament I'll need to introduce another concept which is that of a Hamilton path so a Hamilton path is a directed path meaning we travel along the directions of these ver these edges according to their directions so directed path that passes through each vertex so every vertex of the graph exactly once no more no less so let's see if we can find any hilon paths in this in this examp example well I see one so if we start with the middle vertex and go along this one this Edge then this Edge and then this Edge okay so that's a hemoton path that goes through all four vertices each vertex passing through it exactly once and it always traverses along the direction of the edges okay let us prove the following theorem for every n and there exists a tournament on N vertices with at least n factorial * 2 to the minus n + one hoton paths okay so in other words for every n there is some way to orient the edges of the complete graph on N vertices so that it has lots and lots of Hamilton paths specifically at least this many okay so that's a theorem that we're aiming to prove we will not prove this theorem by explicitly constructing such a tournament instead we'll invoke the probabilistic method and show that a random tournament has in expectation this property so here's the proof let's consider a random tournament on N vertices chosen uniformly at random one way to do this is to take a complete graph on n verticy and for every Edge flip a Fair coin and use that coin to decide which way the edge orients of the two different directions now let's think about the number of Hamilton paths right so each path of the so each um okay so each of the N factorial permutations of vertices forms a directed path okay so first consider a permutation of vertices so for example 2 1 3 3 4 and think about what is the probability that the edges that go in the direction of these uh of this permutation that the edges are all oriented according to the permutation well we have to Flip n minus one coins and all of them have to come up in such a way so that the edges are pointing in the direction of this permutation in order of this permutation so the probability that this is a directed path for a for each of these permutations is precisely 2 to the minus parenthesis n minus one okay and now we invoke the linearity of expectations to claim that the expected number of Hamilton paths must then be well each of the N factorial permutations has probability of 2 Theus n minus one of being a directed path right so this is a calculation that is analogous to the calculation that we did in the earlier part of this video this is what happens in expectation on average and thus there must be some instance where we can beat this average or at least be at least as large as this average so thus there exists a tournament with at least this many Hamilton paths okay and that concludes the proof of this theorem that we laid out earlier so this is an example of applying linearity expectations as a step in the probabilistic method to prove this nice and simple result that there exist tournaments with lots of Hamilton paths

Original Description

MIT 18.226 Probabilistic Methods in Combinatorics, Fall 2024 Instructor: Yufei Zhao View the complete course: https://ocw.mit.edu/courses/18-226-probabilistic-methods-in-combinatorics-fall-2022/ YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP61cYB5ymvFiEbIb-wWHfaqO Two quick combinatorial applications of linearity of expectations: (1) the number of fixed points of a random permutation (2) Hamilton paths in tournaments. License: Creative Commons BY-NC-SA More information at https://ocw.mit.edu/terms More courses at https://ocw.mit.edu Support OCW at http://ow.ly/a1If50zVRlQ We encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from MIT OpenCourseWare · MIT OpenCourseWare · 0 of 60

← Previous Next →
1 21. Post Trade Clearing, Settlement & Processing
21. Post Trade Clearing, Settlement & Processing
MIT OpenCourseWare
2 10. Financial System Challenges & Opportunities
10. Financial System Challenges & Opportunities
MIT OpenCourseWare
3 7. Technical Challenges
7. Technical Challenges
MIT OpenCourseWare
4 3. Blockchain Basics & Cryptography
3. Blockchain Basics & Cryptography
MIT OpenCourseWare
5 19. Primary Markets, ICOs & Venture Capital, Part 1
19. Primary Markets, ICOs & Venture Capital, Part 1
MIT OpenCourseWare
6 1. Introduction for 15.S12 Blockchain and Money, Fall 2018
1. Introduction for 15.S12 Blockchain and Money, Fall 2018
MIT OpenCourseWare
7 Chalk Radio, A Podcast about Inspired Teaching at MIT (Teaser)
Chalk Radio, A Podcast about Inspired Teaching at MIT (Teaser)
MIT OpenCourseWare
8 Nuclear Gets Personal with Prof. Michael Short (S1:E1)
Nuclear Gets Personal with Prof. Michael Short (S1:E1)
MIT OpenCourseWare
9 How Africa Has Been Made to Mean with Prof. Amah Edoh (S1:E2)
How Africa Has Been Made to Mean with Prof. Amah Edoh (S1:E2)
MIT OpenCourseWare
10 Making Deep Learning Human with Prof. Gilbert Strang (S1:E3)
Making Deep Learning Human with Prof. Gilbert Strang (S1:E3)
MIT OpenCourseWare
11 Social Impact at Scale, One Project at a Time with Dr. Anjali Sastry (S1:E4)
Social Impact at Scale, One Project at a Time with Dr. Anjali Sastry (S1:E4)
MIT OpenCourseWare
12 Film is for Everyone with Prof. David Thorburn (S1:E5)
Film is for Everyone with Prof. David Thorburn (S1:E5)
MIT OpenCourseWare
13 Lecture 12: Aircraft Performance
Lecture 12: Aircraft Performance
MIT OpenCourseWare
14 Lecture 3: Learning to Fly
Lecture 3: Learning to Fly
MIT OpenCourseWare
15 Lecture 13:  Interpreting Weather Data
Lecture 13: Interpreting Weather Data
MIT OpenCourseWare
16 Lecture 21: Weather Minimums and Final Tips
Lecture 21: Weather Minimums and Final Tips
MIT OpenCourseWare
17 Hand-on, Minds On with Dr. Christopher Terman (S1:E6)
Hand-on, Minds On with Dr. Christopher Terman (S1:E6)
MIT OpenCourseWare
18 Part 4: Eigenvalues and Eigenvectors
Part 4: Eigenvalues and Eigenvectors
MIT OpenCourseWare
19 Part 5: Singular Values and Singular Vectors
Part 5: Singular Values and Singular Vectors
MIT OpenCourseWare
20 Part 3: Orthogonal Vectors
Part 3: Orthogonal Vectors
MIT OpenCourseWare
21 Part 2: The Big Picture of Linear Algebra
Part 2: The Big Picture of Linear Algebra
MIT OpenCourseWare
22 Part 1: The Column Space of a Matrix
Part 1: The Column Space of a Matrix
MIT OpenCourseWare
23 Intro: A New Way to Start Linear Algebra
Intro: A New Way to Start Linear Algebra
MIT OpenCourseWare
24 9. Chromatin Remodeling and Splicing
9. Chromatin Remodeling and Splicing
MIT OpenCourseWare
25 28. Visualizing Life - Fluorescent Proteins
28. Visualizing Life - Fluorescent Proteins
MIT OpenCourseWare
26 20. Roth's theorem III: polynomial method and arithmetic regularity
20. Roth's theorem III: polynomial method and arithmetic regularity
MIT OpenCourseWare
27 8. Szemerédi's graph regularity lemma III: further applications
8. Szemerédi's graph regularity lemma III: further applications
MIT OpenCourseWare
28 19. Roth's theorem II: Fourier analytic proof in the integers
19. Roth's theorem II: Fourier analytic proof in the integers
MIT OpenCourseWare
29 12. Pseudorandom graphs II: second eigenvalue
12. Pseudorandom graphs II: second eigenvalue
MIT OpenCourseWare
30 1. A bridge between graph theory and additive combinatorics
1. A bridge between graph theory and additive combinatorics
MIT OpenCourseWare
31 Special Episode: Teaching Remotely During Covid-19 with Prof. Justin Reich
Special Episode: Teaching Remotely During Covid-19 with Prof. Justin Reich
MIT OpenCourseWare
32 Spring 2020 Update from Dean Rajagopal
Spring 2020 Update from Dean Rajagopal
MIT OpenCourseWare
33 S1E7: Unpacking Misconceptions about Language & Identities with Prof. Michel DeGraff
S1E7: Unpacking Misconceptions about Language & Identities with Prof. Michel DeGraff
MIT OpenCourseWare
34 Climate 101 Live
Climate 101 Live
MIT OpenCourseWare
35 Welcome for Volunteers (for EarthDNA's Climate 101)
Welcome for Volunteers (for EarthDNA's Climate 101)
MIT OpenCourseWare
36 Learning to Fly with Drs. Philip Greenspun & Tina Srivastava (S1:E8)
Learning to Fly with Drs. Philip Greenspun & Tina Srivastava (S1:E8)
MIT OpenCourseWare
37 Thinking Like an Economist with Prof. Jonathan Gruber (S1:E9)
Thinking Like an Economist with Prof. Jonathan Gruber (S1:E9)
MIT OpenCourseWare
38 2. Cyber Network Data Processing; AI Data Architecture
2. Cyber Network Data Processing; AI Data Architecture
MIT OpenCourseWare
39 1. Artificial Intelligence and Machine Learning
1. Artificial Intelligence and Machine Learning
MIT OpenCourseWare
40 2: Resistor Capacitor Circuit and Nernst Potential - Intro to Neural Computation
2: Resistor Capacitor Circuit and Nernst Potential - Intro to Neural Computation
MIT OpenCourseWare
41 14: Rate Models and Perceptrons - Intro to Neural Computation
14: Rate Models and Perceptrons - Intro to Neural Computation
MIT OpenCourseWare
42 4: Hodgkin-Huxley Model Part 1 - Intro to Neural Computation
4: Hodgkin-Huxley Model Part 1 - Intro to Neural Computation
MIT OpenCourseWare
43 18: Recurrent Networks - Intro to Neural Computation
18: Recurrent Networks - Intro to Neural Computation
MIT OpenCourseWare
44 3: Resistor Capacitor Neuron Model - Intro to Neural Computation
3: Resistor Capacitor Neuron Model - Intro to Neural Computation
MIT OpenCourseWare
45 15: Matrix Operations - Intro to Neural Computation
15: Matrix Operations - Intro to Neural Computation
MIT OpenCourseWare
46 13: Spectral Analysis Part 3 - Intro to Neural Computation
13: Spectral Analysis Part 3 - Intro to Neural Computation
MIT OpenCourseWare
47 16: Basis Sets - Intro to Neural Computation
16: Basis Sets - Intro to Neural Computation
MIT OpenCourseWare
48 20: Hopfield Networks - Intro to Neural Computation
20: Hopfield Networks - Intro to Neural Computation
MIT OpenCourseWare
49 8: Spike Trains - Intro to Neural Computation
8: Spike Trains - Intro to Neural Computation
MIT OpenCourseWare
50 7: Synapses - Intro to Neural Computation
7: Synapses - Intro to Neural Computation
MIT OpenCourseWare
51 19: Neural Integrators - Intro to Neural Computation
19: Neural Integrators - Intro to Neural Computation
MIT OpenCourseWare
52 5: Hodgkin-Huxley Model Part 2 - Intro to Neural Computation
5: Hodgkin-Huxley Model Part 2 - Intro to Neural Computation
MIT OpenCourseWare
53 6: Dendrites - Intro to Neural Computation
6: Dendrites - Intro to Neural Computation
MIT OpenCourseWare
54 17: Principal Components Analysis_ - Intro to Neural Computation
17: Principal Components Analysis_ - Intro to Neural Computation
MIT OpenCourseWare
55 12: Spectral Analysis Part 2 - Intro to Neural Computation
12: Spectral Analysis Part 2 - Intro to Neural Computation
MIT OpenCourseWare
56 11: Spectral Analysis Part 1 - Intro to Neural Computation
11: Spectral Analysis Part 1 - Intro to Neural Computation
MIT OpenCourseWare
57 9: Receptive Fields - Intro to Neural Computation
9: Receptive Fields - Intro to Neural Computation
MIT OpenCourseWare
58 10: Time Series - Intro to Neural Computation
10: Time Series - Intro to Neural Computation
MIT OpenCourseWare
59 1: Course Overview and Ionic Currents - Intro to Neural Computation
1: Course Overview and Ionic Currents - Intro to Neural Computation
MIT OpenCourseWare
60 The Power of OER with Profs. Mary Rowe and Elizabeth Siler (S1:E10)
The Power of OER with Profs. Mary Rowe and Elizabeth Siler (S1:E10)
MIT OpenCourseWare

The video introduces the concept of linearity of expectations and demonstrates its application in combinatorial problems, specifically in proving the existence of tournaments with a large number of Hamilton paths. The instructor uses the probabilistic method to derive interesting consequences in combinatorics.

Key Takeaways
  1. Define the concept of linearity of expectations
  2. Apply linearity of expectations to calculate expected values
  3. Use the probabilistic method to prove existence of certain structures
  4. Derive the expected number of Hamilton paths in a random tournament
💡 Linearity of expectations can be used to derive interesting consequences in combinatorics, and the probabilistic method can be used to prove existence of certain structures.

Related Reads

📰
What Is RAG AI? Retrieval-Augmented Generation Explained — American Dream AI
Learn about RAG AI, a technology that enhances AI generation with retrieval capabilities to improve accuracy and reduce hallucinations
Medium · AI
📰
Treat Retrieved Content as Data, Not Instructions
Learn to treat retrieved content as data, not instructions, to improve model inference and context assembly
Dev.to AI
📰
How to Evaluate Production RAG: Keyword, Vector, SQL, and Hybrid Retrieval
Learn to evaluate production RAG systems by testing keyword, vector, SQL, and hybrid retrieval routes against the same questions
Dev.to · Anya Summers
📰
RAG Database Design: SQL, Full-Text Search, Vector Search, and Context Retrieval
Learn to design a RAG database with SQL, full-text search, vector search, and context retrieval for efficient information retrieval
Dev.to · puffball1567
Up next
Build a Chatbot with RAG in 10 minutes | Python, LangChain, OpenAI
Thomas Janssen
Watch →