# A guide on how to read statistical tables

2020-01-06 3 minute read Shiny app to compute probabilities for the main probability distributions

Below a Shiny app to help you read the main statistical tables:

This Shiny app helps you to compute probabilities for the main probability distributions.

# How to use this app?

1. Open the app via this link
2. Choose the distribution
3. Set the parameter(s) of the distribution (the parameters depend of course on the chosen distribution)
4. Select whether you want to find the lower tail, upper tail or an interval
5. Choose the value of x

On the right panel (or below depending on the size of your screen) you will see:

• a recap of the data you just entered
• the numerical solution (i.e., the probability)
• a visualization of the solution
• the probability density function together with the mean, the standard deviation and the variance

# Example

Here is an example with the most common distribution: the normal distribution.

Suppose the following problem: The cost of weekly maintenance and repair of a business has been observed over a long period of time and turns out to be distributed according to a normal distribution with an average of 402€ and a standard deviation of 22€. Having set a budget of 439€ for next week, what is the probability that the cost exceeds this budget?

To solve this problem, follow these steps in the app:

1. Choose the normal distribution, as it is said that the costs follow a normal distribution
2. Set the mean $$\mu$$ equal to 402, as it is said that the average cost is 402€
3. In the statement, the standard deviation is given (and not the variance) so select “Standard deviation $$\sigma$$” and set it equal to 22
4. We are asked what is the probability the the cost exceeds the budget. Therefore, we look for the probability above a certain x, so select upper tail $$P(X > x)$$
5. We are now asked to find the probability that the cost exceeds 439€, so set x equal to 439

The solution panel gives a recap of the data:

$X ∼ \mathcal{N}(\mu = 402, \sigma^2 = 484)$ where $$484 = 22^2$$, and the solution: $P(X > 439) = P(Z > 1.68) = 0.0463$ where $$Z = \frac{X - \mu}{\sigma} = \frac{439 - 402}{22} = 1.68$$ and $$Z ∼ \mathcal{N}(\mu = 0, \sigma^2 = 1)$$ (known as the standard normal distribution). Thus, the probability that the cost next week exceeds the budget of 439€ is 0.0463, or 4.63%.

It also shows the normal distribution (with $$\mu = 402$$ and $$\sigma^2 = 484$$) with the shaded area corresponding to the probability we are looking for. It then gives some details about the density function, the mean, the standard deviation and the variance.

# Code

Here is the entire code (or see the last version on GitHub) in case you would like to enhance it.

Note that the link may not work if the app has hit the monthly usage limit. Try again later if that is the case.

Thanks for reading. I hope you will find this app useful to compute probabilities for the main distributions.

As always, if you have a question or a suggestion related to the topic covered in this article, please add it as a comment so other readers can benefit from the discussion.

### Liked this post?

Get updates every time a new article is published.
No spam and unsubscribe anytime.
Share on: