## Log-normal distribution

Normal distribution is not suitable when the data are highly skewed or data contains outliers. In such a situation, log-normal distribution is often a good choice.

If $Y\sim N(\mu,\sigma^2)$ then $X= e^Y$ follows a log-normal distribution with parameter $\mu$ and $\sigma^2$.

## Definition of Log-normal Distribution

The continuous random variable `$X$`

has a Log-normal Distribution if the random variable `$Y=\ln (X)$`

has a normal distribution with mean `$\mu$`

and standard deviation `$\sigma$`

. The probability density function of `$X$`

is
```
\[
\begin{equation*}
f(x;\mu,\sigma) =\left\{
\begin{array}{ll}
\frac{1}{\sqrt{2\pi}\sigma x}e^{-\frac{1}{2\sigma^2}(\ln x -\mu)^2}, & \hbox{$x\geq 0$;} \\
0, & \hbox{$x < 0$.}
\end{array}
\right.
\end{equation*}
\]
```

`$\mu$`

is location parameter`$\sigma$`

is scale parameter

## Example

The life-time (in days) of certain electrionic component that operates in a high-temperature environment is log-normally distributed with $\mu=1.2$ and $\sigma=0.5$.

a. Find mean and variance of lifetime of electronic component.

b. Find the probability that the component works till 4 days.

c. Find the probability that the component works more than 5 days.

d. Find the probability that the component works between 3 and 5 days.

### Solution

Let $X$ denote the life-time (in days) of certain electronic components that operates in a high-temperature environment. Given that $X\sim LN(1.2, 0.5^2)$. That is $\mu = 1.2$ and $\sigma = 0.5$.

Then $\ln(X)\sim N(1.2,0.25)$ distribution.

a. The mean of Log-normal distribution is
```
$$
\begin{aligned}
E(X) &= e^{\mu+\sigma^2/2}\\
&= e^{1.2 + 0.5^2/2}\\
&= e^{1.325}\\
&= 3.7622
\end{aligned}
$$
```

and the variance of log-normal distribution is
```
$$
\begin{aligned}
V(X) &= e^{2\mu+\sigma^2}\big(e^{\sigma^2}-1\big)\\
&= e^{2*1.2 + 0.5^2}\big(e^{0.5^2}-1\big)\\
&= e^{2.65}\big(e^{0.25}-1\big)\\
&= 14.154\big(0.284\big)\\
&= 4.0197
\end{aligned}
$$
```

b. The probability that the component works till 4 days is $P(X<4)$.
The $Z$ score that corresponds to $4$ is
```
$$
\begin{aligned}
z&=\dfrac{\ln(X)-\mu}{\sigma}\\
&=\dfrac{\ln(4)-1.2}{0.5}\\
&\approx0.37
\end{aligned}
$$
```

Thus the probability that the component works till 4 days is
```
$$
\begin{aligned}
P(X<4) &=P(\ln(X)<\ln(4))\\
&=P(Z<0.37)\\
&=0.6443
\end{aligned}
$$
```

c. The probability that the component works more than 5 days is $P(X>5)$.
The $Z$ score that corresponds to $5$ is
```
$$
\begin{aligned}
z&=\dfrac{\ln(X)-\mu}{\sigma}\\
&=\dfrac{\ln(5)-1.2}{0.5}\\
&\approx0.82
\end{aligned}
$$
```

The probability that the component works more than 5 days is
```
$$
\begin{aligned}
P(X>5) &=1-P(X<5)\\
&= 1-P(\ln X< \ln (5))\\
&= 1-P(Z< 0.82)\\
&=1-0.7939\\
&=0.2061
\end{aligned}
$$
```

d. The probability that the component works between 3 and 5 days is $P(3<X<5)$.
The Z score that corresponds to $3$ and $5$ are respectively
```
$$
\begin{aligned}
z_1&=\dfrac{\ln(X)-\mu}{\sigma}\\
&=\dfrac{\ln(3)-1.2}{0.5}\\
&\approx-0.2
\end{aligned}
$$
```

and
```
$$
\begin{aligned}
z_2&=\dfrac{\ln(X)-\mu}{\sigma}\\
&=\dfrac{\ln(5)-1.2}{0.5}\\
&\approx0.82
\end{aligned}
$$
```

The probability that the component works between 3 and 5 days is
```
$$
\begin{aligned}
P(3 \leq X\leq 5) &=P(\ln (3) \leq \ln X\leq \ln(5))\\
&=P(-0.2\leq Z\leq 0.82)\\
&= P(Z<0.82) -P(Z< -0.2)\\
&=0.7939-0.4207\\
&= 0.3732
\end{aligned}
$$
```

Hope this example helps you understand how to solve the problems on log-normal distribution.