function value = p0_sample_likelihood ( par_num, zp )

%*****************************************************************************80
%
%% P0_SAMPLE_LIKELIHOOD computes the log likelihood function.
%
%  Discussion:
%
%    This is a one mode Gaussian.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    22 January 2018
%
%  Author:
%
%    John Burkardt
%
%  Input parameters:
%
%    Input, integer PAR_NUM, the total number of parameters.
%    1 <= PAR_NUM.
%
%    Input, real ZP(PAR_NUM), a sample.
%
%  Output parameters:
%
%    Output, real VALUE, the log likelihood function for the sample.
%
  arg1 = log ( 1.0 / 3.0 / ( 2.0 * pi ) ) ...
    - 0.5 * sum ( ( zp(1:par_num) + 5.0 ) .^ 2 );

  arg2 = log ( 2.0 / 3.0 / ( 2.0 * pi ) ) ...
    - 0.5 * sum ( ( zp(1:par_num) - 5.0 ) .^ 2 );

  value = max ( arg1, arg2 );
    
  return
end
