Let us consider a normally distributed random variable \(X.\)

Probability density function of a normal random vriable \(X\) is written as:

\(f(X=x)=\frac{1}{\sqrt{2 \pi} \sigma} \exp ^{-\frac{1}{2} \left( \frac{x-\mu}{\sigma }\right)^{2}}\)

where \(-\infty < \mu < \infty\) and \(0< \sigma < \infty.\)

Example : The textbook you need to buy for your Statiatics class is expensive at the college bookstore, so you consider buying it on Ebay instead. A look at the past auctions suggest that the prices of that statistics textbook have an approximately normal distribution with standard deviation $15.

We wish to acertain which value of \(\mu\) is most consistent with sample data.

Consider \(\mu= \$89.\) Let us consider three random samples from the sales history : $115, $120, and $127.

If \(\mu\) were $89 the sample observations would be in the right tail. These are unlikely occurances.

- Consider \(\mu= \$118\), now the observations would be at the center of the distribution. Our current choice of \(\mu\) is more likely than the previous one.

```
par(mfrow=c(1,2)) # divide ploting window into a matrix of 1 by 2
## left figure
sigma= 15
mu= 89
x<- seq(40, 140,length=200)
f<- 1/(sqrt(2*pi)*sigma)*exp(-(x-mu)^2/(2*sigma^2))
plot(x,f,type="l",lwd=2,col="red", xlab="price(x)", ylab="probability")
abline(v=115, lty=3, col="blue")
abline(v=120, lty=3, col="blue")
abline(v=127, lty=3, col="blue")
######## right figure
sigma= 15
mu= 118
x<- seq(70, 180,length=200)
f<- 1/(sqrt(2*pi)*sigma)*exp(-(x-mu)^2/(2*sigma^2))
plot(x,f,type="l",lwd=2,col="red", xlab="price(x)", ylab="probability")
abline(v=115, lty=3, col="blue")
abline(v=120, lty=3, col="blue")
abline(v=127, lty=3, col="blue")
```