function birthday_sample_test ( )

%*****************************************************************************80
%
%% birthday_sample_test() tests birthday_sample().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 March 2016
%
%  Author:
%
%    John Burkardt
%
  nsample = 10000;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'BIRTHDAY_SAMPLE_TEST():\n' );
  fprintf ( 1, '  BIRTHDAY_SAMPLE() samples the Birthday distribution.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   N            Mean           PDF\n' );
  fprintf ( 1, '\n' );

  for n = 10 : 40

    x = zeros ( nsample, 1 );
    for i = 1 : nsample
      x(i) = birthday_sample ( n );
    end

    x_mean = mean ( x );
    pdf = birthday_pdf ( n );

    fprintf ( 1, '  %2d  %14g  %14g\n', n, x_mean, pdf );

  end

  return
end
