I defined a function with nn
terms where nn
is a variable:
LogLH[μ_, σ_] = n Log[a[σ]] - Sum[Log[y[[i]]] +
(Log[y[[i]]] - μ)^2 / (2 σ^2), {i, 1, n}]
In this function, the y[[i]]y[[i]]
are (assumed to represent) observations of a quantity - picked from a list of nn
elements.
This statement multiply produces the error "The expression i cannot be used as a part specification". It seems however, that M. correctly evaluates the function. M. also computes the partial derivatives for [Mu]μ and [Sigma]σ. But the above errors repeat and lateron, I can not apply the Solve command to the resulting system of equations. Hence my question: How can I define an open ended list of n elements in M.?