I have a temperature data and I believe it follows the normal distribution. The problem is that I know just values for few ranges, but I need to have the results for finer temperature classes.
So, as input I have:
T<23°C --> 21.50%
23°<T<65°C --> 75.27%
65°<T<85°C --> 2.15%
85°<T<95°C --> 1.08%
and I know that it follow a normal distribution. and then I need to estimate the temperature for the following ranges:
X°<T<X+5°C --> % ; where X=-40,-35, ..., 85, 90, 95, 100,...
Since I do not have a solid mathematical question, I appreciate your help on this topic.
Before you can provide the probability of the temperature being in each interval $[x, x + 5)$, we first need to derive estimates for the mean and variance of the normal distribution.
Given the limited data you provide, we will only be able to get a very crude estimate for the parameters $\mu$, $\sigma^2$ (respectively the mean and variance) required to describe the normal distribution. Given a random variable $T \sim N(\mu,\sigma^2)$ we can define its cumulative distribution function $F_{\mu,\sigma^2}$ to be
$$ F_{\mu,\sigma^2}(t) = \mathbf P[T \leq t]$$
The data you provided allows us to estimate that the values $\mu,\sigma^2$ should produce a CDF similar to:
$$ \begin{aligned} F(23) & = 0.2150 \\ F(65) & = 0.9677 \\ F(85) & = 0.9892 \\ F(95) & = 1.0000 \end{aligned} $$
Let us denote $t_i$ for the temperatures at which we have data above, and $p_i$ for the corresponding probabilities above. I.e. $t_1 = 23, \, t_2 = 65,...$ and $p_1 = 0.2150, \, p_2 = 0.9677,...$.
We will approximate $\mu,\,\sigma^2$ by minimising the squared error:
$$\sum_{i=1}^4 \left\{ F_{\mu,\sigma^2}(t_i) - p_i\right\}^2$$
To actually find the values $\mu,\sigma^2$ that minimize this we will need to use a computer solver as there is no explicit formula. The code below can be run in
R; it is adapted from this postThis returns the values $\mu \approx 35.61$, and $\sigma^2 \approx 255.42$ (or $\sigma \approx 15.98$). We can plot how well the corresponding cumulative distribution fits the observed data (see plot at the end).
Finally we can now use these estimates to construct the probabilities for each of the ranges you wanted:
which gives:
Note: since the probability of a temperature below 0 is so small I have not provided all rows from -40C onwards, and start at 0. The first column you can ignore, the second colume is a temperature $t$, the third column is the probability that the temperature will be less than $t$, whilst the fourth column is the probability of being in the range $[t,t+5)$.