MML Discourse archived in May, 2026

Mean and standard distribution of a uniform distribution

mark

Suppose that X is uniformly distributed over the interval [0,10] Find the mean and standard deviation of X.

User 009

mean

\int_a^b x*p(x)\\ \\ \int_0^{10} x \frac{1}{10} dx\\
\frac{x^2}{2}\Bigg|_0^{10}\\ \\ \frac{1}{10}(\frac{10^2}{2}-\frac{0^2}{2})\\ \\ \frac{100}{2} = 50\\ \\ \frac{1}{10}(50) = 5\\ \\ mean = 5

variance and standard deviation

Var(x) = e(x^2) - (e(x))^2\\ (e(x))^2 = 5^2 = 25\\ \\ e(x^2) = \int_0^{10} x^2 \frac{1}{10} dx\\
\frac{x^3}{3}\Bigg|_0^{10}\\ \\ \frac{1}{10}(\frac{10^3}{3}-\frac{0^3}{3})\\ \\ \frac{1000}{3}\\ \\ \frac{1}{10}(\frac{1000}{3}) = \frac{1000}{30} = \frac{100}{3} = e(x^2)\\ \\ e(x^2) - (e(x))^2\\ \\ \frac{100}{3} - 25 = \frac{25}{3}\\ \\ Var(x) = \frac{25}{3}
SD(X) = \sqrt{Var(x)}\\ \\ SD(X) = \sqrt{\frac{25}{3}}
mark

@User 025
If X is uniformly distributed over the interval [0,10], then X is a continuous random variable - not discrete. Thus, mean and standard deviation are defined in terms of integrals, rather than sums.

You can read more about this in our class presentations

This column of slides specifically describes mean (also called expectation) and standard deviation for continuous random variables and compares it to discrete.

User 012
f(x)=\begin{cases}\frac{1}{10} & \text{if } 0 \le x \le 10 \\ \,\,0 & \text{else}\end{cases}.
\mu=\frac{1}{10}\int^{10}_{0}x\,dx=\frac{1}{20}x^{2}\bigg{|}_{0}^{10}=5.
\sigma^{2}=\frac{1}{10}\int^{10}_{0}(x-5)^{2}\,dx \\ \text{let } u=x-5, \quad du=dx \\ \sigma^{2}=\frac{1}{10}\int^{5}_{-5}u^{2}\,du=\frac{1}{30}u^{3}\bigg{|}^{5}_{-5}=\frac{1}{30}(5^3-(-5)^3)=\frac{25}{3}\\ \sigma={\sqrt{\frac{25}{3}}=\frac{5}{\sqrt{3}}}.
mark

@User 027 Yes that looks great!

By the way, whenever you want to make a small change to a post, you can edit that post, rather than deleting and creating a new post. To do so, just click on the pencil in the toolbar below the post, I've circled it here:

You might need to expand the toolbar to see it, though.

User 012

@mark Yeah, I was going to do that. Unfortunately, I accidentally hit delete and it gave me an error when I tried to undo it. More practice for me I suppose :joy:.