function english_word_length_sample_test ( )

%*****************************************************************************80
%
%% english_word_length_sample_test() tests english_word_length_sample().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 April 2016
%
%  Author:
%
%    John Burkardt
%
  sample_num = 1000;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'ENGLISH_WORD_LENGTH_SAMPLE_TEST():\n' );
  fprintf ( 1, '  ENGLISH_WORD_LENGTH_MEAN() computes the English Word Length mean;\n' );
  fprintf ( 1, '  ENGLISH_WORD_LENGTH_SAMPLE() samples the English Word Length distribution;\n' );
  fprintf ( 1, '  ENGLISH_WORD_LENGTH_VARIANCE() computes the English Word Length variance.\n' );

  ewl_mean = english_word_length_mean ( );
  ewl_var = english_word_length_variance ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF mean =                    %14g\n', ewl_mean );
  fprintf ( 1, '  PDF variance =                %14g\n', ewl_var );

  for i = 1 : sample_num
    x(i) = english_word_length_sample ( );
  end

  x_mean = mean ( x );
  x_var  = var ( x );
  x_max  = max ( x );
  x_min  = min ( x );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Sample size =     %12d\n', sample_num );
  fprintf ( 1, '  Sample mean =     %14g\n', x_mean );
  fprintf ( 1, '  Sample variance = %14g\n', x_var );
  fprintf ( 1, '  Sample maximum =  %14d\n', x_max );
  fprintf ( 1, '  Sample minimum =  %14d\n', x_min );

  return
end
