function flies_stats_test ( )

%*****************************************************************************80
%
%% flies_stats_test() tests computes statistics for the flies simulation.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 July 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'flies_stats_test():\n' );
  fprintf ( 1, '  Two flies land at random on a plate of radius 1.\n' );
  fprintf ( 1, '  D is the distance between them.\n' );
  fprintf ( 1, '  Compute statistics for a sequence of experiments of size n.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  n   dmin dmean dmax dstd\n' );

  for n = [ 10, 100, 1000, 10000 ]
    d = flies_simulation ( n );
    d_min = min ( d );
    d_mean = mean ( d );
    d_max = max ( d );
    d_std = std ( d );
    fprintf ( 1, '  %5d  %6.4f  %6.4f  %6.4f  %6.4f\n', ...
      n, d_min, d_mean, d_max, d_std );
  end

  return
end
