function die_this_span_test ( )

%*****************************************************************************80
%
%% die_this_span_test() tests die_this_span().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 January 2025
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'die_this_span_test():\n' );
  fprintf ( 1, '  Test die_this_span(), which estimates the probability\n' );
  fprintf ( 1, '  that a particular judge will die within a given span\n' );
  fprintf ( 1, '  of years.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '   Age   Prob\n' );

  for index = 1 : 9
    age = judge_age ( index );
    [ first_name, last_name ] = judge_name ( index );
    fprintf ( 1, '\n' );
    fprintf ( 1, ' #%d %2d  %s %s\n', ...
      index, age, first_name, last_name );
    for span = [ 1, 4, 8, 12 ]
      p = die_this_span ( index, span );
      fprintf ( 1, '    %2d  %6.3f\n', ...
        age + span, p );
    end
  end

  return
end

