This post give this code

```
normalF <- function(parvec) {
# Log of likelihood of a normal distribution
# parvec[1] - mean
# parvec[2] - standard deviation
# x - set of observations. Should be initialized before MLE
sum ( -0.5* log(parvec[2]) - 0.5*(x - parvec[1])^2/parvec[2] )
}
x = c(1,2,3,4) # set of observations
normalF(c(1,1)) # log likelihood function value for given x and mu=sd=1
```

to compute **the log of a likelihood function of a Normal Distribution**. This video computes this object with \mu = 32, \sigma = 2.5 at x=34, which is approximately equal to 0.12.

I plug the params into function `normalF`

,

```
x = c(34) # set of observations
normalF(c(32,2.5)) # log likelihood function value for given x and mu=sd=1
```

and I got -1.258145.

Is the function `normalF`

the right implementation to compute the likelihood of a normal distribution at a point?