Discrete Random Variable Mean Calculator

Calculate expectations from outcomes and probabilities with professional, guided clarity throughout. Add or remove rows, normalize probabilities, and view weighted contributions per entry. Validate totals, import CSV data, and export results as PDF or files. Clear outputs, examples, and tips guide accurate decisions daily.

Input Distribution Advanced
When checked, enter counts in the f column. Probabilities will be computed automatically.
Controls rounding for outputs.
# Outcome xi Probability pi (0–1) Frequency fi xi·pi Remove
Accepted headers: x,p or x,f. Extra columns ignored.
Results
Sum of probabilities
0
Mean E[X] = Σ xipi
0
Rows considered
0
# xi pi xi·pixi2xi2·pi
Totals 0 0 0
Tip: If probabilities do not sum to 1, use Normalize to scale them proportionally.
Example Data Table
xpx·p
00.100.000
10.200.200
20.400.800
30.300.900
1.001.900
Example distribution with mean 1.9. Use Load example to paste these values into the input grid.
Formula Used

For a discrete random variable X taking outcomes xi with probabilities pi, the mean (expected value) is:

E[X] = Σi xi · pi

  • Each probability satisfies 0 ≤ pi ≤ 1 and Σ pi = 1.
  • If you have frequencies fi, probabilities are pi = fi / Σ fi.
  • Only rows with valid numeric entries are included in the sum.

E[X²] = Σ xi2 · pi

Var(X) = E[X²] − (E[X])², σ(X) = √Var(X)

  • Equivalently, Var(X) = Σ (xi − μ)²·pi where μ = E[X].
  • With frequencies fi, compute pi = fi/Σf and apply the same formulas.
How to Use This Calculator
  1. Choose whether you will enter probabilities or frequencies.
  2. Fill the table with outcomes x and either p or f values.
  3. Click Compute mean to calculate Σ xipi.
  4. If Σp ≠ 1, click Normalize to scale probabilities.
  5. Import values from a CSV file or export results as CSV/PDF.
CSV format: header row then values; either x,p or x,f.
Common Discrete Distributions & Mean Formulas
Distribution Parameters Support Mean E[X] Example Parameters → Mean
Bernoulli p ∈ [0,1] {0,1} p p = 0.65 → E[X] = 0.65
Binomial n ∈ ℕ, p ∈ [0,1] {0,1,…,n} n·p n = 20, p = 0.3 → E[X] = 6
Geometric (trials until first success) p ∈ (0,1] {1,2,3,…} 1 / p p = 0.2 → E[X] = 5
Poisson λ > 0 {0,1,2,…} λ λ = 3.4 → E[X] = 3.4
Discrete Uniform a ≤ b, integers {a, a+1, …, b} (a + b) / 2 a = 1, b = 6 → E[X] = 3.5
Use these references to sanity‑check computed means for standard models.
Worked Examples (Datasets & Computed Means)
Case Outcomes xi Probabilities pi Σp E[X] = Σ xipi
A 0, 1, 2, 3 0.10, 0.20, 0.40, 0.30 1.00 1.90
B -1, 0, 2 0.25, 0.50, 0.25 1.00 0.25
C 10, 20, 30 0.20, 0.50, 0.30 1.00 21.00
Load Case A via “Load example”. Enter the others manually to verify outcomes.
Real‑World Use Cases & Interpretation
Domain Variable X Example Outcomes Unit Mean Interpretation
Quality Control Defects per batch 0,1,2,3,… defects Average defects expected per inspected batch
Customer Support Tickets per hour 0,1,2,3,… tickets/hour Average incoming load for staffing decisions
Gaming Dice payout -1, 0, +5, … currency Average return per play of the game
Reliability Failures per day 0,1,2,3,… events/day Expected failures guiding spare‑parts planning
Inventory Demand per period 0,1,2,3,… units Average demand driving reorder thresholds
The mean summarizes long‑run average behavior useful in planning and forecasting.
FAQs

It’s a variable that takes countable outcomes, each with an assigned probability, like dice rolls or defect counts.

Yes. If rounding errors occur, use the Normalize button to scale them proportionally so they total 1.

Yes. Toggle “I have frequencies” and provide counts; probabilities are computed as each count divided by the total count.

As many as needed. The grid grows dynamically and only valid numeric rows are used in calculations.

A summary with date, the table of x, p, and x·p, along with totals and the computed mean E[X].

Related Calculators

Proportion and Ratio Calculatorsquare root calculator with stepsnegative square root calculatorfraction square root calculatorsquare root division calculatordecimal to square root calculatorderivative of square root calculatorharmonic mean calculatorbinomial distribution mean calculatordistribution mean calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.