Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Hypergeometric Expected Value Calculator

How to use Hypergeometric Expected Value Calculator
  1. Set N (population size), K (successes in the population) and n (sample size) with the sliders or the number boxes; the box reports E(X)=n×K/NE(X) = n × K / N, the success rate and the possible outcomes. Learn more about the parameters
  2. If KK or nn exceeds NN the results wait; click Reset to return to N=50N = 50, K=20K = 20, n=10n = 10. Learn more about messages and Reset
  3. The panel on the right shows E(X)E(X) with its formula, examples in context, and Additional Statistics (variance, standard deviation, mode) behind a toggle. Learn more about the panel
  4. Click Compare with Different Values to set an alternative NN, KK and nn and see the two expected values side by side. Learn more about comparing
  5. Use the tabs E(X) Visualization, How E(X) is Calculated and Individual Contributions for a chart, the steps, or each count's share. Learn more about the tabs
  6. The box under the calculator explains what E(X)E(X) means and why it equals n×K/Nn × K / N. Learn more about the box


Expected Value Calculators

Expected Value Calculator - Hypergeometric Distribution

Calculate the expected value (average number of successes) when drawing without replacement from a finite population. Perfect for quality control, card games, lottery analysis, or any sampling scenario where items are not replaced.

💡
Key Insight: E(X) = 4.00 means when you draw 10 items without replacement from a population of 50 (where 20 are successes), you expect 4.00 successes on average.

Parameters

Formula:E(X) = n × K / N
Success rate in population:40.0%
Possible outcomes:0 to 10 successes

Contribution to E(X)

x SuccessesProbabilityContribution
00.0029250.000000
10.0278560.027856
20.1082580.216516
30.2259300.677789
40.2800591.120234
50.2150851.075425
60.1034060.620438
70.0306390.214472
80.0053340.042676
90.0004910.004415
100.0000180.000180
E(X) =4.0000
Expected Value (Successes in Sample)
E(X) = 4.0000
Formula: n×K/N = 10×20/50 = 4.00
Interpretation: Drawing 10 items without replacement, expect 4.00 successes on average
📊E(X) in Context: Small population sampling
  • 50 total items, 20 are successes (40%). Draw 10? Expect 4.00 successes
  • Like drawing cards without replacement - each draw affects the next
  • Typical range: 3 to 5 successes
Probability Distribution with E(X) = 4.00
Probability
E(X) = 4.00
0
0.028
1
0.108
2
0.226
3
0.280
4
0.215
5
0.103
6
0.031
7
8
9
10
Number of Successes

Understanding Expected Value for Hypergeometric Distribution

What Does E(X) Mean? The expected value E(X) represents the average number of successes you will get when drawing n items without replacement from a population of N items containing K successes. It is the proportion of successes in the population multiplied by your sample size.

Interpreting Your Result. Expect E(X) successes in your sample of n; the population has a success rate of K / N; with no replacement, each draw changes the remaining population slightly.

Real-World Examples. Card games: 52 cards, 13 hearts, draw 5? Expect 1.25 hearts. Quality control: 100 items, 10 defective, sample 20? Expect 2 defects. Lottery: 50 balls, 20 winning, draw 10? Expect 4 winners.

Why E(X) = n × K / N. This formula reflects the simple fact that your sample should reflect the population proportion. If K/N of the population are successes, then K/N of your sample should be successes too. Multiply by n to get the count: n × (K/N) = nK/N. Unlike the binomial case there is no replacement, but the expected value is the same; it is the variance that differs. Learn more about the hypergeometric distribution




Calculate Expected Value

Use the calculator below to compute the expected value with step-by-step solutions and detailed explanations.



Setting N, K and n

DemoFive defective parts, a sample too large, 101 counts, Reset
Step 0 of 4
Under Parameters, set N (Population Size), K (Success States in Population) and n (Sample Size) with the sliders or by typing whole numbers in the boxes; the slider for NN runs from 22 to 200200, the one for KK from 00 to NN and the one for nn from 11 to NN (at most 100100), while the boxes take any whole numbers. The setting is valid when N>0N > 0, 0≤K≤N0 \le K \le N and 0<n≤N0 < n \le N; a box that breaks this turns red and the right panel shows "Enter valid parameters: N > 0, 0 ≤ K ≤ N, 0 < n ≤ N" until it is fixed. While valid, the box reports the formula E(X)=n×K/NE(X) = n × K / N, the Success rate in population K/NK / N as a percentage, and the Possible outcomes, the smallest and largest number of successes the sample can hold; the Key Insight line above the calculator restates E(X)E(X).

For the box of parts in the formula section, N=50N = 50, K=5K = 5 and n=10n = 10, the rate is 10.0%10.0\%, the outcomes run from 00 to 55 and E(X)=1.0000E(X) = 1.0000. A sample larger than the population, such as n=60n = 60 with N=50N = 50, is rejected. A Contribution to E(X) table lists each count xx with P(X=x)P(X = x) and the product x⋅P(X=x)x \cdot P(X = x) while at most 2020 counts are possible; the chart stays up to 5050, and beyond that a note gives the number of possible counts, as for N=200N = 200, K=100K = 100, n=100n = 100, where 101101 counts are possible and E(X)=50.0000E(X) = 50.0000. There is no Calculate button; everything recomputes as you type.

Reset, at the top right of the parameter box, returns to N=50N = 50, K=20K = 20, n=10n = 10, with E(X)=4.0000E(X) = 4.0000, closes the comparison and the extra statistics, and selects the first tab. What the three numbers mean is explained in the hypergeometric distribution.

Reading the Expected Value Panel

DemoHearts in a hand, the extra statistics, aces
Step 0 of 3
The right panel is built around one number: E(X), the expected successes in the sample, in large type, with the formula n×K/Nn × K / N filled in and an interpretation line. Below it, E(X) in Context turns the number into a scenario chosen from the parameters: a population of at most 100100 with a sample of at most 2020 reads "Small population sampling", a success share below 20%20\% "Rare items (quality control, defects)", a share above 80%80\% "High proportion (common items)", and anything else "Balanced population"; each gives three lines, among them a typical range of successes. Click ▶ Additional Statistics to open the variance nKN(1−KN)N−nN−1n \frac{K}{N} \left(1 - \frac{K}{N}\right) \frac{N - n}{N - 1}, the standard deviation and the Mode, the most likely count, ⌊(n+1)(K+1)/(N+2)⌋\lfloor (n + 1)(K + 1) / (N + 2) \rfloor.

For a five-card hand from a deck of 5252 with 1313 hearts, N=52N = 52, K=13K = 13, n=5n = 5, the panel reads E(X)=1.2500E(X) = 1.2500 with the small-population scenario and a typical range of 00 to 22 hearts; the variance is 0.86400.8640, the standard deviation 0.92950.9295 and the mode 11 heart. With the 44 aces instead, K=4K = 4, it reads 0.38460.3846, 0.32720.3272, 0.57200.5720 and a mode of 00. The box under the calculator, Understanding Expected Value for Hypergeometric Distribution, explains what E(X)E(X) means, gives three stock examples and shows why the formula is n×K/Nn × K / N; its link opens the first section below. The formula is worked through in formula and worked example.

Comparing Two Settings

DemoThe default against 100, 30, 15 and two changes
Step 0 of 3
Click ▶ Compare with Different Values under the parameter box to open an Alternative N, Alternative K and Alternative n. The panel then shows the current setting with its E(X)E(X), the alternative with its E(X)E(X), and the difference as a percentage of the current value, marked with an arrow as more or fewer successes expected. The alternative opens as N=100N = 100, K=30K = 30, n=15n = 15: against the default it is E(X)=4.50E(X) = 4.50, 12.5%12.5\% more than 4.004.00. Change the alternative nn to 1010 and its E(X)E(X) becomes 3.003.00, 25.0%25.0\% fewer; raise the alternative KK to 4040 and the two settings have the same expected value, 44, which the panel says in words.

The comparison uses only nK/Nn K / N, so settings with the same success share and sample size tie whatever the population size: N=50N = 50, K=20K = 20 and N=100N = 100, K=40K = 40 both expect 44 of 1010 draws to succeed, although the smaller population gives the smaller variance. An alternative that breaks the validity rules shows nothing. Why the share alone fixes E(X)E(X) is explained in the hypergeometric distribution.

The Three Tabs

DemoCalculation, contributions, visualization
Step 0 of 3
Under the statistics are three tabs; they change what is drawn, not the numbers. E(X) Visualization (the default) draws one bar per possible count xx with height P(X=x)P(X = x) and marks the expected value; for the default setting the bars peak at 44 successes. When more than 5050 counts are possible the chart gives way to a summary with the parameters and the typical range. How E(X) is Calculated writes the formula and four steps: identify NN, KK and nn, compute the proportion K/NK / N, apply n×K/Nn × K / N, and compute; for the default it reads 20/50=0.400020 / 50 = 0.4000 and 10×0.4000=4.000010 × 0.4000 = 4.0000 successes, followed by a note that drawing without replacement changes the odds from draw to draw but not the expected value. Individual Contributions, shown only while at most 2020 counts are possible, draws each product x⋅P(X=x)x \cdot P(X = x) as a bar.

Use the calculation tab to check a homework answer, the visualization to see the shape, and the contributions to see which counts carry the mean. Reset returns to the visualization tab. The steps of the calculation tab are the ones written out in formula and worked example.

The Hypergeometric Distribution

The hypergeometric distribution counts the successes in a sample of size nn drawn without replacement from a population of size NN that contains KK successes. Each draw changes what remains, so the draws are not independent.

The expected value is still simple: the sample is expected to have the same share of successes as the population. The population share is KN\frac{K}{N}, and a sample of nn items contains nn times that share on average.

The experiment is set out in the probabilistic experiment behind the hypergeometric distribution, its three numbers in parameters, and the probabilities of each count in probability mass function and support.

Formula and Worked Example

For a sample of size nn from a population of NN items with KK successes:

E[X]=n⋅KNE[X] = n \cdot \frac{K}{N}


Example: a box of 5050 parts contains 55 defective ones, and 1010 parts are drawn without replacement. Then

E[X]=10⋅550=1E[X] = 10 \cdot \frac{5}{50} = 1


On average the sample contains 11 defective part. The mean is the same as for a binomial model with p=KNp = \frac{K}{N}, but the variance is smaller by the factor N−nN−1\frac{N - n}{N - 1}, because drawing without replacement reduces the spread.

The mean is derived in expected value (mean) and the corrected variance in variance and standard deviation; the binomial variance it is compared with is in variance and standard deviation of the binomial lesson.

Where This Is Used

Hypergeometric models fit sampling from a finite group without putting items back: inspecting a sample from a production lot, the number of aces in a five-card poker hand, or the number of matching numbers on a lottery ticket.

For a five-card hand from a 5252-card deck with 44 aces, the expected number of aces is 5⋅452=513≈0.3855 \cdot \frac{4}{52} = \frac{5}{13} \approx 0.385. When the population is much larger than the sample, the binomial distribution gives almost the same answers.

More settings are listed in applications and examples; the with-replacement model it approaches is the probabilistic experiment behind the binomial distribution.