?How to use Hypergeometric Expected Value Calculator▶
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/N, the success rate and the possible outcomes. Learn more about the parameters
The panel on the right shows E(X) with its formula, examples in context, and Additional Statistics (variance, standard deviation, mode) behind a toggle. Learn more about the panel
Click Compare with Different Values to set an alternative N, K and n and see the two expected values side by side. Learn more about comparing
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
The box under the calculator explains what E(X) means and why it equals n×K/N. Learn more about the box
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.
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
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 N runs from 2 to 200, the one for K from 0 to N and the one for n from 1 to N (at most 100), while the boxes take any whole numbers. The setting is valid when N>0, 0≤K≤N and 0<n≤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/N, the Success rate in populationK/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).
For the box of parts in the formula section, N=50, K=5 and n=10, the rate is 10.0%, the outcomes run from 0 to 5 and E(X)=1.0000. A sample larger than the population, such as n=60 with N=50, is rejected. A Contribution to E(X) table lists each count x with P(X=x) and the product x⋅P(X=x) while at most 20 counts are possible; the chart stays up to 50, and beyond that a note gives the number of possible counts, as for N=200, K=100, n=100, where 101 counts are possible and E(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=50, K=20, n=10, with E(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/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 100 with a sample of at most 20 reads "Small population sampling", a success share below 20% "Rare items (quality control, defects)", a share above 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 nNK(1−NK)N−1N−n, the standard deviation and the Mode, the most likely count, ⌊(n+1)(K+1)/(N+2)⌋.
For a five-card hand from a deck of 52 with 13 hearts, N=52, K=13, n=5, the panel reads E(X)=1.2500 with the small-population scenario and a typical range of 0 to 2 hearts; the variance is 0.8640, the standard deviation 0.9295 and the mode 1 heart. With the 4 aces instead, K=4, it reads 0.3846, 0.3272, 0.5720 and a mode of 0. The box under the calculator, Understanding Expected Value for Hypergeometric Distribution, explains what E(X) means, gives three stock examples and shows why the formula is n×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), the alternative with its 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=100, K=30, n=15: against the default it is E(X)=4.50, 12.5% more than 4.00. Change the alternative n to 10 and its E(X) becomes 3.00, 25.0% fewer; raise the alternative K to 40 and the two settings have the same expected value, 4, which the panel says in words.
The comparison uses only nK/N, so settings with the same success share and sample size tie whatever the population size: N=50, K=20 and N=100, K=40 both expect 4 of 10 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) 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 x with height P(X=x) and marks the expected value; for the default setting the bars peak at 4 successes. When more than 50 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 N, K and n, compute the proportion K/N, apply n×K/N, and compute; for the default it reads 20/50=0.4000 and 10×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 20 counts are possible, draws each product x⋅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 n drawn without replacement from a population of size N that contains K 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 NK, and a sample of n items contains n times that share on average.
For a sample of size n from a population of N items with K successes:
E[X]=n⋅NK
Example: a box of 50 parts contains 5 defective ones, and 10 parts are drawn without replacement. Then
E[X]=10⋅505=1
On average the sample contains 1 defective part. The mean is the same as for a binomial model with p=NK, but the variance is smaller by the factor N−1N−n, because drawing without replacement reduces the spread.
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 52-card deck with 4 aces, the expected number of aces is 5⋅524=135≈0.385. When the population is much larger than the sample, the binomial distribution gives almost the same answers.