Description Usage Arguments Details Author(s) References See Also
Calculates the log-likelihood of X following a normal distribution.
1 |
mu |
Numeric. Location parameter mean μ. |
sigma |
Numeric. Positive number. Scale parameter standard deviation σ = √{σ^2}. |
x |
Numeric vector. Values of the random variable X. |
neg |
Logical.
If |
The natural log of the likelihood function for the normal (or Gaussian or Gauss or Laplace–Gauss) distribution is given by
\ln \mathcal{L} ≤ft( μ, σ^2 \mid x \right) = \mathcal{l} ≤ft( μ, σ^2 \mid x \right) \\ \mathcal{l} ≤ft( μ, σ^2 \mid x \right) = \ln ≤ft\{ ≤ft( \frac{1}{√{2 π σ^2}} \right)^n \exp ≤ft[ - \frac{1}{2 σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 \right] \right\} \\ = - \frac{n}{2} \ln 2 π σ^2 - \frac{1}{2 σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 . %(\#eq:dist-normll)
with independent and identically distributed sample data x \in \mathbf{R}, μ is the location parameter mean being estimated ≤ft( μ \in \mathbf{R} \right), and σ^2 is the scale parameter variance being estimated ≤ft( σ^2 > 0 \right).
The negative log-likelihood is given by
- \mathcal{l} ≤ft( μ, σ^2 \mid x \right) = - ≤ft[ - \frac{n}{2} \ln 2 π σ^2 - \frac{1}{2 σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 \right] \\ = \frac{n}{2} \ln 2 π σ^2 + \frac{1}{2 σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 . %(\#eq:dist-normnegll)
Ivan Jacob Agaloos Pesigan
Wikipedia: Normal Distribution
Wikipedia: Likelihood Function
Other normal likelihood functions:
norm2ll()
,
normL()
,
normobj()
,
normpdf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.