Binomial Distribution
Compute \( P(X = a) \) Compute \( P(X \leq a) \) Find \( x \) when \( P(X \leq x) \geq c \) Plot a binomial distribtuion

Compute \( P(X = a) \)

Consider \( X \sim \mathcal{B}(8, 0.3) \). Suppose you want to calculate \( P(X = 4) \)

  1. Create a new document, select Add Calculator.
  2. Press Menu Icon, select Probability > Distributions > Binomial Pdf
  3. Enter the number of trials, the probability of success and the x-value.

    Press OK. The result should be 0.136 (rounded).

Compute \( P(X \leq a) \)

Consider \( X \sim \mathcal{B}(8, 0.3) \). Suppose you want to calculate \( P(X \leq 5) \)

  1. Create a new document, select Add Calculator.
  2. Press Menu Icon, select Probability > Distributions > Binomial Cdf
  3. Enter the number of trials, the probability of success and the x-value.

  4. Press Enter Icon and the result is displayed. The result should be 0.988708.

    NB: If you wanted to compute \( P(X < 5) \) instead, you would calculate \( P(X \leq 4) \) (since the binomial distribution is discrete).

Find \( x \) when \( P(X \leq x) \geq c \)

Consider \( X \sim \mathcal{B}(8, 0.3) \). Suppose you want to find the smallest x for which \( P(X \leq x) \geq 0.6 \).

  1. Create a new document, select Add Calculator.
  2. Press Menu Icon, select Probability > Distributions > Inverse Binomial
  3. Enter the cumulative probability, the number of trials and the probability of success.

  4. Press Enter Icon and the result is displayed. The result should be 3.

    Note that Binomial Cdf(8,0.3,3)=0.806, which is not 0.6. But since Binomial Cdf(8,0.3,2)=0.552 is smaller than 0.6, Inverse Binomial gives us 3 (even though 2 gives an area closer to 0.6, the calculator gives the first integer that gives an area bigger or equal to 0.6).

    Warning Icon

    Pay attention to the discrepancy between the values!

Plot a binomial distribution

To plot a binomial distribution, we will create two lists, one being the possible amount of successful trials, and the other their probability, and then plot it.

  1. Create a new document, select Add List & Spreadsheets
  2. In the first column: type n as the column name and fill the cell with numbers from 0 to n (n=8 in our case). In the second column: type bin as the column name and type binompdf(8,0.3) in the cell below 'bin'
  3. Press Enter Icon and the probability of success for each number of trials is displayed.

    Graph Example

  4. Now we need to plot the graph. Type Control Icon and Doc Icon, select Add Data & Statistics.
  5. Select Click to add variable on the x-axis, choose n. Select Click to add variable on the y-axis, choose bin.
  6. To connect data points: press Menu Icon , select Plot Properties > Connect Data Points. The following plot should be displayed:

    Graph Example