ums_uninf_prior#

agabpylib.posteriors.meanvarnormal.ums_uninf_prior(n, xbar, V, mu, sigma)#

Calculate the joint posterior distribution for the unknown mean \(\mu\) and unknown standard deviation \(\sigma\), for an uninformative prior in both parameters.

The prior on \(\mu\) is flat while the the prior on \(\sigma\) is \(p(\sigma)\propto 1/\sigma\). The posterior is calculated over the input grid in \((\mu, \sigma)\) for the data characterized by the number of samples \(n\), the mean \(\bar{x}\), and the variance \(V\).

Parameters:
  • n (int) – The number of data points \(x_i\)

  • xbar (float) – The mean of the data points \(x_i\)

  • V (float) – The data variance \(\sum(x_i-\bar{x})^2/n\)

  • mu (float array) – 2D-array of \(\mu\) values (obtained through numpy.meshgrid for example)

  • sigma (float array) – 2D-array of \(\sigma\) values

Returns:

lnP – The value of ln(posterior) at each grid point.

Return type:

float array