statable Statistics for study and research

Calculate distributions: probability, quantile, mean

In brief

Choose a distribution, enter the parameters, ask the question: “at most (≤)”, “less than (<)”, “at least (≥)”, “more than (>)”, “between a and b” or “value for a probability”. The result appears as a decimal and in percent (0.0443 = 4.43%), as a sentence and as a picture with the coloured and hatched area or the hatched bars.

Discrete or continuous

Quantile

For discrete distributions the quantile is the smallest value x with P(X ≤ x) ≥ p (the definition used by R). Statable shows the probability actually reached, because it is usually slightly above p, as only whole values exist. It is not the rejection region of a test: that is determined by the tile “Understand the test for a proportion” using the school rule.

Custom distribution

Enter values x and probabilities P(x) in a table, as decimals or fractions (1/6). Statable calculates E(X) = Σ x · P(x) and Var(X) = Σ x² · P(x) − E(X)². If the sum is not 1, nothing is adjusted silently: a question appears whether rounded values were used, with the choices “Scale to 1” and “Keep as is”. E(X) is the long-run mean, not the most frequent value.

Normal approximation of the binomial distribution

Mean, variance and standard deviation

Every distribution shows μ, σ² and σ. What does not exist is stated and not shown as “NaN”: the t distribution has no mean for at most 1 degree of freedom and no finite variance for at most 2; the F distribution has a mean from df₂ > 2 and a variance from df₂ > 4.

Hypergeometric

Statable labels N (elements in total), K (of them hits) and n (drawn without replacement), as taught in school. R writes phyper(q, m, n, k) with m = K hits, n = N − K misses and k = drawn; the names differ, the result does not. Example lottery “6 of 49”: N = 49, K = 6, n = 6.

For specialists

Densities after Loader (1999, as in R dbinom, dpois, dhyper), tails by summing from the mode outwards, beta and gamma functions with continued fractions, t and F distributions via the beta function. Quantiles of continuous distributions agree with R to a relative 1e-8, quantiles of discrete distributions exactly. Checked against R and against PSPP; printed examples: table of the binomial cumulative function n = 20, p = 0.3 (F(5) = 0.4164), standard normal table.

Sources

Related

Open in Statable