Random Variable Variance Calculator

Solve variance from probabilities, frequencies, or raw observations. Review expected value, squared deviations, and spread. Clean outputs, exports, and charts support deeper learning today.

Enter Distribution Data

Use the responsive calculator grid below. It displays three columns on large screens, two on medium screens, and one on mobile devices.

Separate numbers with spaces, commas, new lines, or semicolons.
For discrete mode, probabilities should sum to 1 unless auto normalization is enabled.

Example Data Table

Value x Probability p(x) x × p(x) x² × p(x)
00.100.00000.0000
10.200.20000.2000
20.300.60001.2000
30.250.75002.2500
40.150.60002.4000
Total 1.00 2.1500 6.0500

For this example, the expected value is 2.15 and the variance is 1.4275. This sample is already loaded as the default calculator input.

Formula Used

Expected value: μ = Σ[xi pi]

Second moment: E[X²] = Σ[xi² pi]

Variance: Var(X) = Σ[pi(xi - μ)²] = E[X²] - μ²

Standard deviation: σ = √Var(X)

Coefficient of variation: CV = (σ / |μ|) × 100%

Empirical sample variance: s² = Σ[fi(xi - x̄)²] / (n - 1)

The calculator also reports skewness and excess kurtosis when the standard deviation is nonzero.

How to Use This Calculator

  1. Select an input mode: discrete probabilities, frequency table, or raw observations.
  2. Enter values and matching probabilities or frequencies, or paste raw data.
  3. Choose decimal precision and turn normalization on if needed.
  4. Press Calculate Variance to display results above the form.
  5. Review the summary cards, detailed variance table, and Plotly graph.
  6. Use the export buttons to download your result set as CSV or PDF.

FAQs

1. What does this calculator measure?

It measures the variance of a random variable and also reports the mean, second moment, standard deviation, skewness, kurtosis, and other supporting metrics.

2. Can I use frequencies instead of probabilities?

Yes. Choose frequency mode and enter the value list with matching frequencies. The calculator converts frequencies into probabilities before computing the variance.

3. What happens if my probabilities do not sum to one?

Enable auto normalization to scale them automatically. If you leave normalization off, probabilities should already represent a valid total probability distribution.

4. Does raw mode calculate a population variance or sample variance?

Raw mode first builds an empirical distribution and reports its variance. It also shows a sample variance and sample standard deviation for observational data.

5. Why is my coefficient of variation undefined?

The coefficient of variation divides the standard deviation by the absolute mean. If the mean is zero or extremely close to zero, the ratio becomes undefined.

6. What does the graph show?

The bar series shows the distribution probabilities, while the line series shows how much each value contributes to the overall variance.

7. Can this calculator handle repeated values?

Yes. Repeated values are combined automatically in discrete and frequency modes. In raw mode, repeated observations are counted and converted into empirical probabilities.

8. Which variance formula is used internally?

It uses both equivalent forms: Var(X) = E[X²] - μ² and Var(X) = Σ[p(x)(x - μ)²]. The detailed table verifies the contribution form row by row.

Related Calculators

negative binomial calculatordistribution curve calculatorf distribution calculatorgeometric distribution calculatormultinomial distribution calculatorcontinuous distribution calculatorrandom number generator calculatornormal probability calculatorcumulative distribution function calculatorbernoulli distribution 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.