Imagine you are concerned with the concentration of an airborne contaminant, $X$, measured in ppm. A previous benchmark study estimates that there is a 10% and 1% chance, respectively, of exceeding 4 and 10 ppm, respectively. You have been asked by the regulatory agency to estimate the contaminant concentration with 0.1% probability of being exceeded. Prior studies suggest that a Gumbel distribution can be used to model contaminant concentration, given by the CDF:
Using the cell blocks below as a guide (and also to check your analysis): Task 1) find the parameters of a Gumbel distribution that matches the information provided above, then, Task 2) use it to estimate the concentration with exceedance probability 0.1%.
To complete this assignment, you can use `numpy`, `matplotlib` and from the `math` library, `log` and `e` (these are imported for you when you inialize the notebook).
**Task 2:** write a function to solve for the desired random variable value (it will be tested for you with the Check answer button, along with the distribution parameters).
%% Cell type:code id: tags:
``` python
deffind_x_with_probability_p(p):
""" Compute point in the gumbel distribution for which the CDF is p
Use the variables mu and beta defined above!
Hint: they have been defined globally, so you don't need to