umv_uninf_prior#

agabpylib.posteriors.meanvarnormal.umv_uninf_prior(n, xbar, V, mu, tau)#

Calculate the joint posterior distribution for the unknown mean \(\mu\) and unknown variance \(\tau=\sigma^2\), for an uninformative prior in both parameters.

The prior on \(\mu\) is flat while the the prior on \(\tau\) is \(p(\tau)\propto 1/\tau\). The posterior is calculated over the input grid in \((\mu, \tau)\) 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)

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

Returns:

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

Return type:

float array