function birthday_sample_test ( )

%*****************************************************************************80
%
%% BIRTHDAY_SAMPLE_TEST tests BIRTHDAY_SAMPLE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    09 March 2016
%
%  Author:
%
%    John Burkardt
%
  nsample = 10000;
  seed = 12345678;

  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), seed ] = birthday_sample ( n, seed );
    end

    mean = i4vec_mean ( nsample, x );
    pdf = birthday_pdf ( n );

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

  end

  return
end
