StatSolver Logo StatSolver

Discrete Probability Calculator

1. Define Dimensions

2. Input Probabilities

Enter values for P(X,Y).

Total Probability: 0.00

3. Calculate

Σ How I Analyze Joint Probability

In my probability course I encountered a difficult problem that required looking at two variables at the same time. I was analyzing a software program that had two different modules. I needed to track the number of errors in Module 1 (variable X) versus the number of errors in Module 2 (variable Y). That assignment taught me that looking at one variable in isolation often hides the real story. I built this calculator to handle those complex "X and Y" scenarios where you need to check if two events are truly independent or if they influence each other. For example I had to calculate if a bug in the first module made it more likely to find a bug in the second module.

Step-by-Step Instructions:

  1. Set your grid size - Enter the number of rows (X values) and columns (Y values), then click "Generate"
  2. Define your variables - Fill in the X and Y value headers in the grid
  3. Enter probabilities - Fill in each cell with P(X,Y). Use decimals (0.25) or fractions (1/4)
  4. Verify your sum - Make sure all probabilities add up to exactly 1.0
  5. Calculate - Click "CALCULATE RESULTS" to see marginal distributions, covariance, and correlation

Binomial distribution guide

When a binomial model is appropriate

The binomial distribution models the number of successes in a fixed number of repeated trials. It is a good fit when the question asks “how many?” and every trial has two outcomes, such as pass or fail, watched or did not watch, and defective or acceptable.

Four assumptions to check

  • The number of trials n is fixed before the experiment begins.
  • Each trial has exactly two mutually exclusive outcomes.
  • The success probability p stays constant from trial to trial.
  • Trials are independent, so one result does not change the next trial's probability.

If sampling without replacement from a small population, the independence assumption may fail. If the event rate changes over time, separate models or a different distribution may be more honest.

Formula and summary statistics

For X successes in n trials, the probability of exactly x successes is P(X = x) = C(n,x)px(1-p)n-x. The combination C(n,x) counts the distinct orders in which those successes can occur.

The mean is np and the variance is np(1-p). The mean is a long-run average, not a promise that one group will produce that exact result. StatSolver calculates every value from x = 0 through n so you can compare exact and cumulative probabilities.

Worked example

Suppose 31.5% of independently selected viewers plan to watch a movie and you survey 10 people. Set n = 10 and p = 0.315. The expected count is np = 3.15 viewers.

The probability of exactly five viewers is C(10,5)(0.315)5(0.685)5 ≈ 0.1179, or 11.79%. The probability of at least five is the sum from x = 5 through 10, approximately 0.1772, or 17.72%. “Exactly five” and “at least five” are different questions.

Reading the calculator

The histogram shows the full probability mass function. The tallest bars are the most likely counts; they are not necessarily the only reasonable outcomes. The results table is useful for exact values, while cumulative totals answer phrases such as “at most,” “fewer than,” and “at least.”

For one trial, use the Bernoulli calculator. If trials continue until the first success, use the Geometric calculator.

Common mistakes and reference

Enter p as a decimal between 0 and 1, keep “success” defined consistently, and do not treat dependent observations as independent trials. For a formal definition and the cumulative formula, see the NIST/SEMATECH binomial distribution reference.