function before_test ( )

%*****************************************************************************80
%
%% before_test() tests before().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 January 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'before_test():\n' );
  fprintf ( 1, '  before() estimates the probability that a person,\n' );
  fprintf ( 1, '  flipping a biased coin repeatedly, will reach 4 heads\n' );
  fprintf ( 1, '  before reaching 7 tails.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  bias     p(4H before 7T)\n' );
  fprintf ( 1, '\n' );

  for i = 0 : 5 : 100
    bias = i / 100;
    prob = before ( bias );
    fprintf ( 1, '  %g  %g\n', bias, prob );
  end

  return
end

