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

Bernoulli distribution guide

The probability model for one yes-or-no trial

A Bernoulli distribution represents one experiment with two mutually exclusive outcomes. StatSolver labels success as X = 1 with probability p and failure as X = 0 with probability 1 - p. This simple model is the building block for binomial trials and many binary-data methods.

What the parameter means

The value p is the probability of the outcome you decide to call “success.” Success is a mathematical label, not necessarily something desirable. A defective part, missed payment, or software failure can be coded as 1 if that is the event being studied.

The two probabilities must be complementary: P(X = 1) = p and P(X = 0) = 1 - p. Enter p as a decimal from 0 through 1. Changing which outcome is labeled success replaces p with 1 - p.

Formula, mean, and variance

The probability mass function is P(X = x) = px(1-p)1-x for x equal to 0 or 1. The expected value is E[X] = p, and the variance is p(1-p).

An expected value such as 0.315 does not describe a fractional outcome from one trial. It means that across many comparable trials, the long-run average of the zero-one indicator should approach 0.315. Variance is highest at p = 0.5 and falls to zero at p = 0 or p = 1.

Worked viewer example

Suppose one randomly selected viewer has a 31.5% probability of watching a movie. Define watching as X = 1 and not watching as X = 0. Then p = 0.315.

P(X = 1) = 0.315, P(X = 0) = 0.685, E[X] = 0.315, and Var(X) = 0.315 × 0.685 = 0.215775. The standard deviation is approximately 0.4645. These quantities describe uncertainty for one binary observation, not the number of viewers in a group.

From Bernoulli to binomial

If the same Bernoulli experiment is repeated n times independently with the same p, the total number of successes follows a binomial distribution. Its mean becomes np and its variance becomes np(1-p).

Independence and constant probability are essential. Repeated measurements from the same person, changing conditions, or feedback between trials can break those assumptions even though each individual outcome is still binary.

Choosing the next calculator

Use the Binomial calculator to count successes over a fixed number of independent trials. Use the Geometric calculator when trials continue until the first success. Use the Joint calculator when two variables are observed together and their relationship matters.