function variance = burr_variance ( a, b, c, d )

%*****************************************************************************80
%
%% burr_variance() returns the variance of the Burr PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, C, D, the parameters of the PDF.
%    0 < B,
%    0 < C.
%
%  Output:
%
%    real VARIANCE, the variance of the PDF.
%
  if ( c <= 2.0 )

    fprintf ( 1, '\n' );
    fprintf ( 1, 'BURR_VARIANCE - Warning!\n' );
    fprintf ( 1, '  Variance undefined for C <= 2.\n' );
    variance = Inf;

  else

    mu1 = b     * d * beta ( ( c * d - 1.0 ) / c, ( c + 1.0 ) / c );
    mu2 = b * b * d * beta ( ( c * d - 2.0 ) / c, ( c + 2.0 ) / c );
    variance = - mu1 * mu1 + mu2;

  end

  return
end
