function r8vec_variance_test ( )

%*****************************************************************************80
%
%% r8vec_variance_test() tests r8vec_variance().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 May 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8vec_variance_test()\n' );
  fprintf ( 1, '  r8vec_variance() computes the variance of an R8VEC.\n' );;
 
  n = 10;
  r8_lo = -5.0;
  r8_hi = +5.0;
  a = r8_lo + ( r8_hi - r8_lo ) * rand ( n, 1 );
 
  r8vec_print ( n, a, '  Input vector:' );

  v = r8vec_variance ( n, a );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  VARIANCE:   %f\n', v );

  return
end
