What Is the Expected Number of Apples Left in the Basket?
At a glance
- 1. Specify the setup
Identify the number of apples and exactly how apples are selected, removed, or returned.
- 2. Track survival
For each apple, determine the probability that it remains in the basket.
- 3. Add probabilities
Sum the survival probabilities to get the expected number left.
The expected number of apples left cannot be determined from the basket alone. You need the starting number of apples and the rules for choosing, eating, removing, or replacing them. Different rules can give different answers, even when the basket starts with the same number.
A general method works for many versions of the problem: calculate the probability that each apple remains, then add those probabilities.
Use indicator variables
Suppose the basket starts with apples. For apple , define an indicator variable that equals 1 if that apple is still in the basket at the end and 0 otherwise. The total number left is
By linearity of expectation,
This works whether the apples’ fates are independent or not. You do not need to find the full probability distribution of the total; you only need each apple’s chance of remaining.
If a fixed number of apples is removed
If there are apples and exactly are removed, then the number left is always . Since it is not random, its expected value is also
For example, if a basket has 12 apples and 5 are selected and removed, 7 are left every time. The expected number left is 7, regardless of whether the 5 apples were chosen uniformly at random.
Random selection matters when you ask about a particular kind of apple, or when the number removed is itself random.
Worked example: expected number of red apples left
Suppose a basket has 12 apples, 5 of them red. Four apples are chosen uniformly at random without replacement and removed. The total number left is always . To find the expected number of red apples left, consider each of the 5 red apples separately.
A particular red apple has probability of being selected for removal, so its probability of remaining is . Adding that survival probability for all 5 red apples gives
The expected count is , or about 3.33. That does not mean a basket can contain a fraction of an apple. It means that over many repetitions of the same random procedure, the average number of red apples left approaches 3.33.
More generally, if of apples are a particular type and exactly apples are removed uniformly without replacement, then each apple has probability of remaining. Thus the expected number of that type left is
If each apple has a chance of being removed
Suppose each of apples is independently removed with probability . Each apple then remains with probability , so
For instance, if there are 10 apples and each has a 20% chance of being removed, the expected number left is . The actual count can vary from one repetition to another; 8 is the average in the long run.
Independence is not needed for this expectation formula if each apple still has the same probability of remaining. Independence would matter for calculating other quantities, such as the probability that exactly 8 remain.
Common mistakes
- Assuming a random choice changes the total left. If exactly apples are removed, the total remaining is fixed at ; randomness affects which apples remain, not how many.
- Confusing an expected count with a guaranteed count. An expectation can be non-integer and need not be a count that occurs in any one trial.
- Leaving out the removal rules. “Apples are chosen at random” is not enough by itself. You need to know how many are chosen, whether they are returned, and whether choices repeat.
- Treating apples as equally likely to remain without justification. That is appropriate for uniform selection, but not if some apples are more likely to be removed than others.
To get a specific numerical answer for a particular basket puzzle, state the starting number of apples and the complete selection or removal procedure. Then apply the indicator method, or subtract the number removed if that number is fixed.
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.