function normal_ms_variance_test ( )

%*****************************************************************************80
%
%% normal_ms_variance_test() tests normal_ms_variance().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 March 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'normal_ms_variance_test():\n' );
  fprintf ( 1, '  normal_ms_variance() returns the variance\n' );
  fprintf ( 1, '  of the Normal MS distribution.\n' );

  mu = 100.0;
  sigma = 15.0;

  variance = normal_ms_variance ( mu, sigma );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF parameter MU =    %14f\n', mu );
  fprintf ( 1, '  PDF parameter SIGMA = %14f\n', sigma );
  fprintf ( 1, '  PDF variance =        %14f\n', variance );

  nsample = 1000;

  for i = 1 : nsample
    x(i) = normal_ms_sample ( mu, sigma );
  end

  variance = var ( x );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Sample size =     %6d\n', nsample );
  fprintf ( 1, '  Sample variance = %14f\n', variance );

  return
end
