| # | Model | a/m | b/n | x/k | PDF/PMF | Mean | Variance | Width / Support Size | Timestamp |
|---|
Tip: use Add to Table after each run, then export.
| # | Model | a/m | b/n | x/k | Expected PDF/PMF | |
|---|---|---|---|---|---|---|
| 1 | Continuous | 0 | 5 | 2 | 0.2 | |
| 2 | Continuous | -3 | 1 | -3 | 0.25 | |
| 3 | Discrete | 1 | 6 | 4 | 1/6 ≈ 0.1666667 | |
| 4 | Discrete | 10 | 14 | 9 | 0 (outside support) |
Click Load to populate the form with the row values.
Continuous Uniform, $X \\sim \\mathrm{Unif}(a,b)$ with $a < b$:
- PDF: $f_X(x)=\\begin{cases}\\dfrac{1}{b-a}, & a \\le x \\le b \\\\ 0, & \\text{otherwise}\\end{cases}$
- Mean: $\\mathbb{E}[X]=\\dfrac{a+b}{2}$
- Variance: $\\mathrm{Var}(X)=\\dfrac{(b-a)^2}{12}$
Discrete Uniform on integers $m, m+1,\\dots,n$ with $m \\le n$:
- PMF: $p_X(k)=\\begin{cases}\\dfrac{1}{n-m+1}, & k \\in \\{m,\\dots,n\\} \\\\ 0, & \\text{otherwise}\\end{cases}$
- Mean: $\\mathbb{E}[X]=\\dfrac{m+n}{2}$
- Variance: $\\mathrm{Var}(X)=\\dfrac{(n-m+1)^2-1}{12}$
Endpoint convention: For the continuous case, the value on the boundary has the same constant PDF as the interior.
- Choose Continuous or Discrete from the Model menu.
- Enter bounds and the evaluation point. Ensure $a<b$ or $m\\le n$.
- Click Compute Value to see PDF/PMF, mean, and variance.
- Click Add to Table to accumulate multiple scenarios.
- Use Download CSV or Download PDF to export results.
For discrete mode, k must be an integer in $[m,n]$ when integer enforcement is enabled.
PDF (continuous): For $X\sim \mathrm{Unif}(a,b)$, the value $f_X(x)$ is the height of the density at $x$. It equals $\tfrac{1}{b-a}$ when $a\le x\le b$ and $0$ otherwise. A PDF is not a probability at a single point; probabilities come from areas: $\mathbb{P}(x_1\le X\le x_2)=\int_{x_1}^{x_2} f_X(x)\,dx$.
PMF (discrete): For $X$ uniform on the integers $\{m,\dots,n\}$, the value $p_X(k)$ is the probability of $X=k$. It equals $\tfrac{1}{n-m+1}$ when $k$ is an integer in $[m,n]$, and $0$ otherwise.
Units: PDF has units of $1/\text{(units of }X\text{)}$; PMF is dimensionless. Endpoint handling for the continuous case is conventional; this tool uses $[a,b]$ inclusion by default.
Cumulative Distribution Function (CDF) gives the probability that a random variable is less than or equal to a value.
Continuous Uniform, $X\sim \mathrm{Unif}(a,b)$: $$ F_X(x)=\begin{cases} 0,& xb \end{cases} $$
Discrete Uniform on integers $\{m,\dots,n\}$:
$$
F_X(x)=\begin{cases}
0,& x
CDFs are monotone non-decreasing and always range from 0 to 1.
These examples illustrate how CDFs accumulate probability up to a point.
Key similarity (continuous case): symmetry about the mean. Both the continuous uniform $\\mathrm{Unif}(a,b)$ and the normal $\\mathcal{N}(\\mu,\\sigma^2)$ are symmetric around their center: the midpoint $\\tfrac{a+b}{2}$ for uniform and the mean $\\mu$ for normal. Formally, $$f\\big(\\text{center}+d\\big)=f\\big(\\text{center}-d\\big).$$ For uniform, $\\text{center}=\\tfrac{a+b}{2}$; for normal, $\\text{center}=\\mu$.
- Two-parameter families: Uniform uses $(a,b)$; normal uses $(\\mu,\\sigma)$. Each pair fully determines the distribution.
- Area under the curve gives probability: For both, probabilities are obtained by integrating the density over intervals.
- Finite mean and variance: $\\mathbb{E}[X]=\\tfrac{a+b}{2}$, $\\mathrm{Var}(X)=\\tfrac{(b-a)^2}{12}$ for uniform; $\\mathbb{E}[X]=\\mu$, $\\mathrm{Var}(X)=\\sigma^2$ for normal.
- CLT connection: The sample mean of many i.i.d. draws from either distribution is approximately normal (Central Limit Theorem).
Note: The discrete uniform shares the two-parameter and finite-moment properties, but its PMF is not continuous.
| # | a | b | Width (b−a) | x | In Range? | PDF = 1/(b−a) |
|---|---|---|---|---|---|---|
| 1 | 0 | 5 | 5 | 2 | Yes | 0.2 |
| 2 | -3 | 1 | 4 | -1 | Yes | 0.25 |
| 3 | 2 | 3 | 1 | 3 | Yes | 1 |
| 4 | 1 | 4 | 3 | 6 | No | 0 |
For any x outside [a,b], the PDF value is 0.
| # | m | n | Support Size (n−m+1) | k | In Support? | PMF = 1/(n−m+1) |
|---|---|---|---|---|---|---|
| 1 | 1 | 6 | 6 | 4 | Yes | 0.1666667 |
| 2 | 10 | 14 | 5 | 9 | No | 0 |
| 3 | -2 | 2 | 5 | 0 | Yes | 0.2 |
| 4 | 3 | 3 | 1 | 3 | Yes | 1 |
When the support has one integer, the PMF at that integer equals 1.
| # | Model | Parameters | Mean | Variance | Width / Size | Notes |
|---|---|---|---|---|---|---|
| 1 | Continuous | a=0, b=5 | 2.5 | 25/12 ≈ 2.083333 | 5 | PDF constant at 0.2 on [0,5]. |
| 2 | Continuous | a=-3, b=1 | -1 | 16/12 ≈ 1.333333 | 4 | Symmetric about -1, endpoints included by default. |
| 3 | Discrete | m=1, n=6 | 3.5 | 35/12 ≈ 2.916667 | 6 | Fair die; PMF is 1/6 at each face. |
| 4 | Discrete | m=10, n=14 | 12 | 24/12 = 2 | 5 | Five equally likely integers from 10 to 14. |
Formulas: mean $(a+b)/2$ or $(m+n)/2$; variance $(b-a)^2/12$ or $\big((n-m+1)^2-1\big)/12$.