# 4.1 Uniform Probabilities using the Excel Spreadsheet provided and Excel Spreadsheet

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

Definition: Uniform Distribution Excel Spreadsheet Provided

When a variable is continuous, its probability is the area under the curve and the x-axis.  The total probability sums to one.  In the case of a Uniform distribution, the area is a rectangle.

Suppose you have a random variable X that is Uniformly distributed, X ~ U(1, 55).  Compute the following using the Excel Spreadsheet provided.

1. Mean
2. Standard Deviation
3. Probability Distribution Function
4. P(X > 21)
5. P(X < 34)
6. P(X< 40| X> 30)
7. P(X > 15| X< 45)
8. P(13<X< 35)
9. Find the 67th percentile

The first thing you will do is open the Excel Spreadsheet and click on the Uniform Distribution tab at the bottom.  Then enter 1 in cell B1 and 55 in cell B2.

1. The mean is in cell B4, 28.
2. The standard deviation is in cell B5, 15.5885.
3. The probability distribution function is in cell B3, 1/54.
4. To compute the probability P(X > 21), change the c value to 21 in cell B6.  The answer is in cell B10, 0.6296. (Make sure 1 is in cell B1 and 55 is in cell B2)
5. To compute the probability P(X < 34), change the c value to 34 in cell B6.  The answer is in cell B9, 0.6111.  (Make sure 1 is in cell B1 and 55 is in cell B2)
6. Since the probability is a conditional probability, it changes the shape of the distribution.  X greater than 30 means we change B1, the minimum to 30 in cell B1.  The maximum value is still 55 so we do not change B2.  Next, we change the value of c in cell B6 to 40.  The answer to the probability question is in cell B9, 0.4000.
7. Since the probability is a conditional probability, it changes the shape of the distribution.  X less than 45 means the maximum value is changed to 45 in cell B2.  However, we do not change the minimum value from 1.  So make sure 1 is in cell B1.  Finally, enter 15 in cell B6.  The answer is in cell B10, 0.6818.
8. To find the probability that X is between 13 and 35, make sure 1 is in cell B1 and 55 is in cell B2.  Then enter 13 in cell B6 and 35 in cell B7.  The answer is in cell B11, 0.4074.
9. To find the 67th percentile, make sure 1 is in cell B1 and 55 is in cell B2.  Then enter .67 in cell E1.  The answer is 37.18.

Interactive Element

##### Uniform Distribution using Excel

When a variable is continuous, its probability is the area under the curve and the x-axis.  The total probability sums to one.  In the case of a Uniform distribution, the area is a rectangle.

Suppose you have a random variable X that is Uniformly distributed, X ~ U(1, 55).  Compute the following using an Excel Spreadsheet.

1. Mean
2. Standard Deviation
3. Probability Distribution Function
4. P(X > 21)
5. P(X < 34)
6. P(X< 40| X> 30)
7. P(X > 15| X< 45)
8. P(13<X< 35)
9. Find the 67th percentile.

Open an Excel Spreadsheet.  In cell B1 enter 1 and in cell B2 enter 55.

1. To compute the mean, enter the word mean in cell A3.  In cell B3, enter the formula = (B1 + B2)/2.

2. To compute the standard deviation, enter the word standard dev. in cell A4.  In cell B4, enter the formula = (B2 - B1)/sqrt(12).

3. To compute the Probability Distribution function, f(x) in cell A5.  Next, compute 55-1 = 54.  In cell B5 enter the probability function, '1/54.

4. To compute the P(X > 21), enter 'P(X>21) in cell A6.  Next, enter the formula into cell B6, = (55 - 21)/(55-1).

5. To compute the P(X < 34), enter 'P(X<34) in cell A7.  Next, enter the formula into cell B7, = (34 - 1)/(55 -1).

6. To compute the P(X < 40| X > 30), enter 'P(X < 40| X> 30) in cell A8.  Next, enter the formula into cell B8, =(40 - 30)/(55 - 30).

7. To compute the P(X > 15|X < 45), enter 'P(X >15|X < 45) in cell A9.  Next, enter the formula into cell B9, = (45 - 15)/(45 - 1).

8. To compute the P(13 < X < 35), enter 'P(13 < X < 35) in cell A10.  Next, enter the formula into cell B10, = (35 - 13)/(55 - 1).

9. To compute the 67th percentile, the following formula is used  0.67 = (X - 1)/(55 - 1).   Solve for x by mulitiplying both sides by (55 - 1), 0.67*(55 - 1) = X - 1.  Next, add 1 to both sides, 0.67*(55 - 1) + 1 = x.  Therefore, enter the formula = 0.67*(55 - 1) + 1 in cell B11.

##### Interactive Element

4.1 Uniform Probabilities using the Excel Spreadsheet provided and Excel Spreadsheet is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.