If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Proof of expected value of geometric random variable

Proof of expected value of geometric random variable.

## Want to join the conversation?

• Why are there multipliers next to the expected values? EX: P(x=2) * 2
(18 votes)
• When Sal said that E(x) = 1/1-(1-p), I understand how you can get the denominator using the finite geometric series proof he showed on a previous video, but how do you get the one on the numerator? I get 1-(1-p)^n / 1-(1-p).
(8 votes)
• Not 1 actually.
The sum of an infinite geometric series is a/1-r ; where a is the first term and r is the common ratio.
Here, "a" happened to be 1 co-incidentally.
(5 votes)
• My teacher tought us that the expected value of a geometric random variable is q/p (where q = 1 - p). I found both formulas on the internet. Which one is the correct one?
(1 vote)
• It depends on how you've set up the geometric random variable. Here, Sal is setting X to be the number of trials you need before you get a successful outcome.
Your teacher, on the other hand, set X to be the number of failures before the first successful outcome.
(16 votes)
• How do you interpret the expected value in this context?
(3 votes)
• In this context, X is the number of trials it takes until you get your first success. Therefore, E(X) is the average number of trials it takes to get your first success. With this in mind, it makes intuitively sense that E(X) = 1/p.
(7 votes)
• (P) is the average success rate (proportion) of any trial, and a geometric random variable (X) is the number of trials until we reach the first success, so the expected value of (X) should be the number of (P)'s that get us to 1. How many (p)'s are there in 1 ? It's ( 1/p ), which is the expected number of trials until we reach the first success or E(X)
(4 votes)
• is the number of (p)'s the same as the value of p?
(1 vote)
• When you subtract (1-p)E(x) from E(x), are you allowed to leave the first term--1p--alone, instead just subtracting the terms of (1-p)E(x) from the corresponding next term in E(x), and still come up with the right answer? I know it's an infinite sequence, so you can't add the unaltered ∞p*(1-p)^∞. Does that mean it doesn't matter, as both sequences go on forever, or does it still change the result?
(2 votes)
• When subtracting (1 − p)E(X) from E(X), you are essentially subtracting the weighted sum of the probabilities of each outcome in E(X) from E(X) itself. Leaving the first term 1p alone while subtracting the corresponding terms from (1 − p)E(X) effectively cancels out the terms related to the probabilities of the outcomes occurring, leaving only the constant term 1p on one side of the equation. This approach is mathematically valid because, as you noted, it's an infinite sequence, and the subtraction process will eventually lead to cancellation of the terms related to probabilities, leaving only the constant term. So, yes, it is allowed, and it doesn't change the result because you're essentially subtracting an infinite series from another infinite series term by term.
(1 vote)
• In the video he is referring to, I think he proved that the sum of a geometric series is a(1-r^n)/(1-r), not 1/(1-r). I have watched all his videos until this point. Did I forget something? When did he prove that the sum of a geometric series is 1/1-r?
(1 vote)
• This requires you to know about limit (Or maybe think about it in your mind). 0 < r < 1 for probability.

Let r = 0.5.
Now if n = 1, what is 0.5^n? It's 0.5.
Now if n = 10, what is 0.5^n? It's 9.765625 * 10^-4.
Now if n = 100000, what is 0.5^n? It's a really small number (I can't get the result on my calculator lol). So by this you know when n tends to infinity, r^n tends to 0. Thus a(1 - r^n) / (1 - r) tends to a / (1 - r).
And the first term is 1, so a = 1.

This means you have a probability of 1 / (1 - r) to success 1 time, if each trial has a success probability of r.
(2 votes)
• will we need the proofs of the formulas on the exam?
is it possible to be a topic of a question?
(1 vote)
• My question is how do we know that we have to take a certain approach while proving the E(X)? In the binomial proof Sal took a different path than the one he took in this video but there also I thought why this path and not something else?
(1 vote)
• The approach taken in proving the expected value of a random variable can vary depending on the specific random variable being considered and the mathematical tools available. In the case of proving the expected value of a geometric random variable, Sal used a method akin to summing an infinite geometric series, leveraging mathematical techniques to manipulate the expression and arrive at the desired result. The choice of approach often depends on the mathematical properties of the random variable and the most effective way to manipulate the equations to prove the desired result. In different scenarios or with different random variables, alternative approaches may be more suitable or easier to implement.
(1 vote)
• For this question:
Lilyana runs a cake decorating business, for which 10% of her orders come over the telephone. Let C be the number of cake orders Lilyana receives in a month until she first gets an order over the telephone. Assume the method of placing each cake order is independent.
Find the probability that it takes fewer than 5 orders for Lilyana to get her first telephone order of the month.
You may round your answer to the nearest hundredth.

I understand why this is the formula for the answer:
1 - 0.9^4

But can someone explain why this doesn't work?
(4!/(1!3!)*.1^1*.9^3)
(0 votes)
• 4!∕(1!3!) × 0.1¹ × 0.9³
only accounts for the possibility of having exactly 1 telephone order among the first four orders, but really we could have 1, 2, 3, or 4 phone orders, and accounting for all those possibilities we get

4!∕(1!3!) × 0.1¹ × 0.9³ +
+ 4!∕(2!2!) × 0.1² × 0.9² +
+ 4!∕(3!1!) × 0.1³ × 0.9¹ +
+ 4!∕(4!0!) × 0.1⁴ × 0.9⁰
(3 votes)

## Video transcript

- [Instructor] So right here we have a classic geometric random variable. We're defining it as the number of independent trials we need to get a success where the probability of success for each trial is lowercase p and we have seen this before when we introduced ourselves to geometric random variables. Now, the goal of this video is to think about well what is the expected value of a geometric random variable like this and I'll tell you the answer, in future videos we will apply this formula, but in this video we're actually going to prove it to ourselves mathematically. But the expected value of a geometric random variable is gonna be one over the probability of success on any given trial. So now let's prove it to ourselves. So the expected value of any random variable is just going to be the probability weighted outcomes that you could have. So you could say it is the probability... The probability that our random variable is equal to one times one plus the probability that our random variable is equal to two times two plus and you get the general idea. It goes on and on and on and a geometric random variable it can only take on values one, two, three, four, so forth and so on. It will not take on the value zero because you cannot have a success if you have not had a trial yet. But what is this going to be equal to? Well, this is going to be equal to, what's the probability that we have a success on our first trial? And actually let me just write it over here. So this is going to be P. What is this going to be? What is the probability that we don't have a success on our first trial, but we have one on our second trial? Well, this is going to be one minus p, that's the first trial where we don't have a success, times a success on the second trial and actually let me do a few more terms here. So let me erase this a little bit, do a few more terms. So this is going to be the probability that X equals two. Sorry, the probability that X equals three times three and we're gonna keep going on and on and on. Well, what's this going to be? Well, the probability that X equals three is we're gonna have to get two unsuccessful trials and so the probability of two unsuccessful trials is one minus P squared and then one successful trial just like that. So you get the general idea. If I wanted to rewrite this and I'm just gonna rewrite it to make it a little bit simpler. So the expected, at least for the purposes of this proof, so the expected value of X is equal to, I'll write this as 1p plus 2p times one minus p plus 3p times one minus p squared and we're gonna keep going on and on and on forever like that. So how do we figure out this sum? And now I'm going to do a little bit of mathematical trickery or gymnastics, but it's all valid and if any of ya'll have seen the proof of taking an infinite geometric series, then we're gonna do a very similar technique. What I'm gonna do here is I'm gonna think about well what is one minus p times this expected value? So let's do that. So if I say one minus p times the expected value of X, what is that going to be equal to? Well, I would multiply every one of these terms times one minus p. So one p times one minus p would be 1p times one minus p. You would get that right over there. What about 2p times one minus p? What would that be equal to? Well, that would be 2p times one minus p and now we're gonna multiply it by one minus p again. So you're gonna get one minus p squared and so I think you see where this is going and we're just gonna keep adding and adding and adding from there. Now we're gonna do something really fun and interesting, at least from a mathematical point of view. If this is equal to that, if the left-hand side is equal to the right-hand side, let's just subtract this value from both sides. So on the left-hand side I would have the expected value of X, that's that, minus this, minus one minus p times the expected value of X. So I'm just subtracting this from that side, but let me subtract this from that side. Well, I could subtract this expression from that, but this is equivalent, so I'm just gonna subtract this from that and so what do I get? Well, let's see. I'm gonna have one minus p and then if I subtract 1p times one minus p from 2p times one minus p, well I'm just going to be left with plus 1p times one minus p and then if I subtract this from that, I'm gonna be left with 1p times one minus p squared and we're just gonna keep going on and on and on and so let me simplify this a little bit. If I distribute this negative, this could be plus and then this would be p minus one and then if we distribute this expected value of X, we get on the left-hand side the, and let me scroll up a little bit. I don't want to scrunch it too much. So let's see, we have the expected value of X and then plus p times the expected value of X. P times the expected value of X minus the expected value of X, these cancel out, is going to be equal to p plus p times one minus p plus p times one minus p squared and it's gonna keep going on and on and on. Well, on the left-hand side all I have is a p times expected value of X. If I want to solve for the expected value of X, I just divide both sides by p. So I get and this is kind of neat through this mathematical gymnastics, I now have, I'm just dividing everything by p, both sides, on the left-hand side I just have the expected value of X. If I divide all of these terms by p, this first term becomes one, the second term becomes one minus p, this third term, if I divide by p, becomes plus one minus p squared, so forth and so on. Now what's cool about this, this is a classic geometric series with a common ratio of one minus p and if that term is completely unfamiliar to you, I encourage you and this is why it's actually called a geometric, one of the reasons, arguments for why it's called a geometric random variable, but I encourage you to review what a geometric series is on Khan Academy if this looks completely unfamiliar, but in other places we proved using actually a very similar technique that we did up here that this sum is going to be equal to one over one minus our common ratio and our common ratio is one minus p. So what is this going to be equal to? And we are really in the home stretch right over here. This is going to be equal to one over one minus one plus p. One minus one plus p. Which is indeed equal to one over p. So there you have it, we have proven to ourselves that the expected value of a geometric random variable using some, I think, cool mathematics is indeed equal to one over p.