Beta, Gamma, Geometric and Negative Binomial Explorer

Explore four distributions students meet after the normal: PDF or PMF and CDF plots, shaded probabilities, inverse CDF, moments, tables and practice questions.

Berjalan dalam pelayar anda. Fail anda tidak pernah meninggalkan peranti. Lihat cara menyemaknya

…

Cara melakukannya

  1. 1
    Choose a distribution

    Pick beta, gamma, geometric or negative binomial and, for the discrete ones, whether X counts trials or failures.

  2. 2
    Set the parameters

    Type the two parameters; invalid values such as a negative shape are flagged straight away.

  3. 3
    Shade a probability

    Choose P(X ≤ a), P(X ≥ a), a range between two values or the two tails outside it, and read the shaded probability.

  4. 4
    Find a quantile

    In Inverse CDF enter a cumulative probability such as 0.9 to get the value that cuts it off.

  5. 5
    Export or print

    Download the probability table as CSV or print the plot with its moments and formulas.

  6. 6
    Practise

    Open Practice, answer generated questions and open the working when you get stuck.

Tentang alat ini

Most probability calculators stop at the normal and binomial distributions, yet second-year statistics, reliability engineering and Bayesian courses keep returning to four others. The beta distribution models proportions between 0 and 1, the gamma distribution models waiting times and positive skewed amounts, the geometric distribution counts tries until a first success, and the negative binomial counts tries until the r-th success. This explorer puts all four on one workbench. You set the parameters, see the density or mass function and the cumulative curve, shade a region such as P(X ≤ a) or P(a ≤ X ≤ b) and read the probability with the formula that produced it. Mean, variance, mode and skewness update as you type, several curves can be overlaid for comparison, and the inverse CDF tab finds the value that cuts off any chosen probability.

Who this is for

Students in introductory and intermediate probability, people preparing for actuarial and reliability exams, Bayesian beginners choosing a beta prior, and anyone who needs a quick percentile of a gamma waiting time without opening statistical software.

The four distributions

Beta(α, β) lives on the interval from 0 to 1. Its density is x^(α−1)(1−x)^(β−1) divided by the beta function B(α, β), the mean is α ÷ (α + β), and the CDF is the regularized incomplete beta function. Gamma(k, θ) uses shape k and scale θ; the mean is kθ, the variance kθ², and the CDF is the regularized lower incomplete gamma function P(k, x/θ). If your textbook uses a rate λ instead, enter θ = 1/λ.

The geometric and negative binomial distributions come in two conventions, and the tool lets you pick either. Counting trials, a geometric variable takes the values 1, 2, 3 and so on with P(X = x) = (1 − p)^(x−1) p and mean 1/p. Counting failures before the first success shifts everything down by one. The negative binomial with r successes has P(K = k) = C(k + r − 1, k) p^r (1 − p)^k for k failures, with mean r(1 − p)/p; the trial-count version adds r to every value. Non-integer r is allowed, which is how the negative binomial is used for over-dispersed count data.

How the numbers are computed

Gamma functions use the Lanczos approximation. Incomplete beta and gamma values come from a series for small arguments and a continued fraction (modified Lentz method) otherwise, the approach described in standard numerical references. Discrete quantiles are found by searching for the smallest integer whose CDF reaches the requested level, and continuous quantiles by bisection. Results agree with SciPy to at least six decimal places in our tests.

Worked example

Take Beta(2, 5). The mean is 2 ÷ 7 = 0.2857, the mode is (2 − 1) ÷ (2 + 5 − 2) = 0.2 and the variance is 10 ÷ (49 × 8) = 0.0255. For P(X ≤ 0.3) the tool evaluates I₀.₃(2, 5) = 0.5798, which you can confirm by hand because, for integer parameters, it equals the chance of at least 2 successes in 6 binomial trials with p = 0.3. For a geometric distribution with p = 0.2 counting trials, P(X = 3) = 0.8² × 0.2 = 0.128 and P(X ≤ 3) = 1 − 0.8³ = 0.488.

Limits

This is a teaching and quick-reference tool, not a fitting package: it does not estimate parameters from your data or run goodness-of-fit tests. Extreme parameters (shape values below 0.01 or above about 10,000) can lose accuracy in the far tails, and discrete tables are cut once the remaining probability is tiny.

Contoh berselesaian

Beta(2, 5): mean 0.2857, mode 0.2, P(X ≤ 0.3) = 0.5798. Geometric p = 0.2: P(X = 3) = 0.128.

Ringkasnya

Soalan lazim

What is the difference between the trials and failures versions?

Counting trials includes the successful attempt, so a geometric variable starts at 1. Counting failures starts at 0. The shape is the same, but every value and the mean shift by 1 (or by r for the negative binomial).

My book writes the gamma distribution with a rate. What do I enter?

Enter the scale θ as 1 divided by the rate. A gamma with shape 3 and rate 0.5 is the same as shape 3 and scale 2, with mean 6.

Why does the beta density go to infinity at 0 or 1?

When α is below 1 the density rises without bound near 0, and when β is below 1 it does so near 1. The area under the curve is still exactly 1, so probabilities stay finite.

Is P(X ≤ a) the same as P(X < a)?

For beta and gamma they are equal because a single point has zero probability. For the discrete distributions they differ by P(X = a), and the region menu treats both ends of a discrete interval as inclusive.

Can I compare two or more curves?

Yes. Add curves with different parameters or distributions and switch them on or off; they are drawn on the same axes with a legend, which makes the effect of each parameter easy to see.

What does the practice tab ask?

It generates fresh questions on probabilities, means and variances for these distributions, checks your typed answer within a small tolerance and shows the full working on request.

Percuma sepenuhnyaTiada bayaran, tiada pendaftaran
Fail kekal peribadiSemuanya berjalan dalam pelayar anda
Mudah dalam bahasa andaTersedia dalam banyak bahasa