**Question: **Suppose we know that the number of items produced in a factory during a week is a random variable with mean 500

- What can be said about the probability that this week’s production will be at least 1000? (Answer = 0.5)
- If the variance of a week’s production is known to equal 83333.3, then what can be said about the probability that this week’s production will be between 400 and 600? (Answer = 1)

**You can scroll through the table to find the answers*

**Solution Part 1**

The solution for the first part can be obtained from Markov’s Inequality. To quickly refresh our understanding of this inequality let us see the definition

P { X ≥ a } ≤ ^{E[X]}⁄_{a} where the random variable X can only take non-negative values

Note: Markov’s Inequality gives an upper bound on the probability. Also note that for some values of a less than the expected value, you get a probability upper bound to be greater than 1. From the definitions of the probability though, since the greater than 1 are nonsensical. †

Simulation: The table below is a calculation and a simulation shown next to each other. The column in Red is the inequality we are interested in. The column in orange is the upper bound defined by Markov’s Inequality. The column in the Blue is the calculated probability from the simulation. The parameters of the simulation are defined as follows. The random variable is Randomly Distributed from 0 to 1000, which means that the expected value is 500.

† In order to remove the nonsensical values, I have used the *Clip* function in Mathematica for restricting the upper limit to 1. Hence you do not see the orange values to be greater than 1.

**Solution Part 2**

For this part, we will be using another inequality expression called Chebyshev’s Inequality. Given that k ≥ 0

P { |X – μ| ≥ k } ≤ ^{σ2}⁄_{k2}

The clipping has been done applied for this inequality as we have done in the previous section. The column in Red is the inequality we are interested in. The column in orange is the upper bound defined by Chebyshev’s Inequality. The column in the Blue is the calculated probability from the simulation. The parameters of the simulation are defined as follows. The random variable is Randomly Distributed from 0 to 1000, which means that the expected value (μ) is 500 and the variance (σ^{2}) is 83333.3.

**Code: **The code for both of the sections is shown below

End of the post 🙂

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.