Expected Value and Variance of Continuous Random Variables (Calculus)

ritvikmath · Intermediate ·🔢 Mathematical Foundations ·13y ago

Key Takeaways

This video covers the calculation of expected value and variance for continuous random variables using calculus, with a focus on probability density functions and integrals.

Full Transcript

so in this video we'll be looking at the expected value and variance for continuous random variables so we're going to use the basis um if you haven't watched the discrete random variables video i suggest you watch that because we've been using that uh that math and applying calculus with it so let's get started so first off they're going to give you a probability density function so let's just give a example one so let's say f of x which is our probability density function is gonna be x over eight and let's draw a small graph for us to look at just the positive section so this just goes off like this so that's x over 8 but it's going to be limited because a probability density function the area under it bounded has to add up to 1. that's the definition of probability density function so uh let's say it starts at zero and ends at some value t and then the all the area under it has to add up to one so what what is that t value so if we just integrate this we find that the t value equals four so here it is and indeed without any calculus we can even we can just tell that um from zero to four this is one because it's a triangle right right triangle so base times height over two so four times and what is f of 4 one half so 4 times 1 half is 2 divided by 2 is 1 so it works out so this is our probability density function right here now the expected value remember in the discrete ones it was the sum of each of those x i's times the probability of x i from i goes to 0 to i goes to you know whatever value it's the same idea here but since there's infinitely many values to choose from now not there's uh there's not just zero one two three four there's zero there's point one point two and all the values in between you know there's all the values we have to use calculus because we have to get infinitely small so but the idea is the same we want to multiply each of these x values by their respective probabilities so it's going to be x times f of x which is the probability you can call this p of x if you like but i'll call f of x so it's this and you have to add them all up you have to add the infinite many of them up from zero to four and put a dx so uh that it's not that hard to do because f of x is x over eight so i'll just take this one eighth actually out times x so this becomes x squared so it just becomes one third x cubed and remember there's one eighth so it becomes 1 24th x cubed so let's get rid of all of this so 1 24 x cubed from 0 to 4 and 4 cubed is 64 so equals 64 over 24 which we could just reduce to eight over three so easy enough we just found our expected value of our continuous probability function so we can say e x equals eight over three so good enough good easy enough so now we're gonna put that aside and we're gonna do the variance the variance is a little harder but it's not that bad once we're gonna derive a formula for it which is gonna make our lives a lot easier so variance what is variance remember when we did the um discrete random variables it was uh it was basically x i minus e squared times uh f of x right it's the same idea here except we have the infinite calculus base thing going on so it's going to be the integral um the integral from 0 to 4 in this case or let's just keep it general we'll call a to b of x minus e squared times f of x dx okay so uh this might be a little uh not good to work with for a lot of problems because of the whole x minus e so we're going to use this to derive an easier form of this equation which we'll use to find the answer to our original problem so here is the equation if you want to look at it now what are we going to do what are we going to do with this so we're going to have to play with a little bit so let's factor this out first so it's going to be x squared minus 2 e x plus e squared times f of x so i'm going to just play with the inside we'll put the integral signs back on afterward when we need to um what do we do now so we're going to factor this all expanded so x squared f of x minus 2 e um e yeah 2ex f of x plus oh we're going low here let me uh let me write this above actually so let's get rid of this and let's go back up here so we're gonna go back up here we're gonna say uh x squared f of x minus two e e times x this is not e of x this is e times x plus uh times f of x plus e squared f of x okay good back on track so then we'll get rid of this and now this let's put aside because this is something we'll use and then remember this is all an integral sign so this is we have so far integral of x squared f of x dx minus integral of and this minus i'm going to take out so it's going to be 2e x f of x minus e squared f of x and put that in brackets or something and dx okay so now this looks a little nasty but it's going to look really nice afterwards so see there's an e in both so we're going to pull the e out so minus e so let's get we can get rid of one e on each of them and then what else can we do so we're going to break this integral up further so minus let's just take this down so this is going to look like 2 integral x f of x dx which is this i take the two out minus integral uh e f of x and we can take this e out since it's a constant dx okay so uh that's what we have so far and see this right here this integral right here is just e that's how i calculated e so we can replace the whole thing with just e and see this integral right here this has to be one because of the definition of a continuous probability function so this we can just replace with one so reality all we have here is two e minus e which just gives us one e and so this whole giant integral that looked really nasty is just e that is one of the beautiful things about math and that's e times e is e squared so in the most elegant form this uh equation is going to look like integral x squared f of x dx minus e squared and let's just quickly use this to solve our original equation so it's going to be it's going to give integral from zero to four of x squared times x over eight d x minus and our expected value was eight over three so that's square that's gonna be 64 over nine and let's factor out the one eighth from here and make this x cubed and then we get one fourth x to the fourth after we integrate this and put a one eighth there you get one over 32 and take that from zero to four uh four to the power four 256 i think over 32 um minus 64 over 9 and let us just use a calculator so 256 divided by what 32 minus 64 divided by 9. we get 0.888889 which let's put into fraction form is just 8 over 9. so 8 over 9 is our variance and to find the standard deviation if you want you could go ahead and square it if you wanted to so that that is the really cool thing about continuous and discrete random variables how you can use calculus to find them and stuff like that so hopefully you guys learned something today so until next time
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from ritvikmath · ritvikmath · 12 of 60

1 Math Team Update
Math Team Update
ritvikmath
2 Single Variable Calculus Volume of a Sphere - Proof 1
Single Variable Calculus Volume of a Sphere - Proof 1
ritvikmath
3 Single Variable Calculus Volume of a Sphere - Proof 2
Single Variable Calculus Volume of a Sphere - Proof 2
ritvikmath
4 Multivariable Calculus Volume of a Sphere Proof - Triple Integrals
Multivariable Calculus Volume of a Sphere Proof - Triple Integrals
ritvikmath
5 Multivariable Calculus Volume of a Sphere Proof - Double Integrals
Multivariable Calculus Volume of a Sphere Proof - Double Integrals
ritvikmath
6 The Euclidian Algorithm
The Euclidian Algorithm
ritvikmath
7 Proving the Chain Rule
Proving the Chain Rule
ritvikmath
8 Proving the Fundamental Theorem of Calculus Part 1
Proving the Fundamental Theorem of Calculus Part 1
ritvikmath
9 Proving the Fundamental Theorem of Calculus Part 2
Proving the Fundamental Theorem of Calculus Part 2
ritvikmath
10 Math Puzzle - Poison Perplexity
Math Puzzle - Poison Perplexity
ritvikmath
11 Math Puzzle - Poison Perplexity - Solution
Math Puzzle - Poison Perplexity - Solution
ritvikmath
Expected Value and Variance of Continuous Random Variables (Calculus)
Expected Value and Variance of Continuous Random Variables (Calculus)
ritvikmath
13 Expected Value and Variance of Discrete Random Variables (No Calculus)
Expected Value and Variance of Discrete Random Variables (No Calculus)
ritvikmath
14 Array Method
Array Method
ritvikmath
15 Complex Power Series and their Derivatives
Complex Power Series and their Derivatives
ritvikmath
16 Distributions - Intro
Distributions - Intro
ritvikmath
17 The Poisson Distribution
The Poisson Distribution
ritvikmath
18 The Bernoulli Distribution
The Bernoulli Distribution
ritvikmath
19 The Binomial Distribution
The Binomial Distribution
ritvikmath
20 The Continuous Uniform Distribution
The Continuous Uniform Distribution
ritvikmath
21 The Geometric Distribution
The Geometric Distribution
ritvikmath
22 The Triangular Distribution
The Triangular Distribution
ritvikmath
23 The Exponential Distribution
The Exponential Distribution
ritvikmath
24 The Borel Distribution + Notes on Poisson Distribution
The Borel Distribution + Notes on Poisson Distribution
ritvikmath
25 The Gamma Distribution
The Gamma Distribution
ritvikmath
26 The Normal Distribution
The Normal Distribution
ritvikmath
27 The Laplace Distribution
The Laplace Distribution
ritvikmath
28 The Chi - Squared Distribution
The Chi - Squared Distribution
ritvikmath
29 Overfitting
Overfitting
ritvikmath
30 Vector Norms
Vector Norms
ritvikmath
31 Truths Behind the Titanic : K-Nearest Neighbor
Truths Behind the Titanic : K-Nearest Neighbor
ritvikmath
32 The Mathematics of Breakups
The Mathematics of Breakups
ritvikmath
33 Sillyfish
Sillyfish
ritvikmath
34 Finding Optimal Paths - Dynamic Programming
Finding Optimal Paths - Dynamic Programming
ritvikmath
35 HowToDataScience : Scraping Twitter Data
HowToDataScience : Scraping Twitter Data
ritvikmath
36 Decision Trees
Decision Trees
ritvikmath
37 Perceptron
Perceptron
ritvikmath
38 Naive Bayes
Naive Bayes
ritvikmath
39 K-Nearest Neighbor
K-Nearest Neighbor
ritvikmath
40 Evaluating Machine Learning Models
Evaluating Machine Learning Models
ritvikmath
41 Decision Tree Pruning
Decision Tree Pruning
ritvikmath
42 K-Means Clustering
K-Means Clustering
ritvikmath
43 Gaussian Mixture Model
Gaussian Mixture Model
ritvikmath
44 Data Science - Fuzzy Record Matching
Data Science - Fuzzy Record Matching
ritvikmath
45 Time Series Talk : Autocorrelation and Partial Autocorrelation
Time Series Talk : Autocorrelation and Partial Autocorrelation
ritvikmath
46 Time Series Talk : Autoregressive Model
Time Series Talk : Autoregressive Model
ritvikmath
47 Time Series Talk : Moving Average Model
Time Series Talk : Moving Average Model
ritvikmath
48 Time Series Talk : ARMA Model
Time Series Talk : ARMA Model
ritvikmath
49 Time Series Talk : ARCH Model
Time Series Talk : ARCH Model
ritvikmath
50 Time Series Talk : White Noise
Time Series Talk : White Noise
ritvikmath
51 Time Series Talk : Stationarity
Time Series Talk : Stationarity
ritvikmath
52 Time Series Talk : ARIMA Model
Time Series Talk : ARIMA Model
ritvikmath
53 Time Series Talk : Lag Operator
Time Series Talk : Lag Operator
ritvikmath
54 Time Series Talk : What is Seasonality ?
Time Series Talk : What is Seasonality ?
ritvikmath
55 Time Series Talk : Seasonal ARIMA Model
Time Series Talk : Seasonal ARIMA Model
ritvikmath
56 So ... What Actually is a Matrix ? : Data Science Basics
So ... What Actually is a Matrix ? : Data Science Basics
ritvikmath
57 Derivative of a Matrix : Data Science Basics
Derivative of a Matrix : Data Science Basics
ritvikmath
58 Basics of PCA (Principal Component Analysis) : Data Science Concepts
Basics of PCA (Principal Component Analysis) : Data Science Concepts
ritvikmath
59 Eigenvalues & Eigenvectors : Data Science Basics
Eigenvalues & Eigenvectors : Data Science Basics
ritvikmath
60 The Covariance Matrix : Data Science Basics
The Covariance Matrix : Data Science Basics
ritvikmath

This video teaches how to calculate expected value and variance for continuous random variables using calculus, covering topics such as probability density functions and integrals. The video provides a step-by-step guide on how to derive formulas and solve problems. By watching this video, viewers will gain a deeper understanding of probability theory and statistics, and learn how to apply calculus to real-world problems.

Key Takeaways
  1. Define a probability density function
  2. Calculate the expected value using integrals
  3. Derive a formula for variance
  4. Apply the formula to solve a problem
  5. Use calculus to find the standard deviation
💡 The video highlights the importance of understanding probability theory and statistics, and how calculus can be used to solve problems involving continuous random variables.

Related Reads

Up next
How to Open OSM Files (OpenStreetMap Data)
File Extension Geeks
Watch →