function mean = empirical_discrete_mean ( a, b, c )

%*****************************************************************************80
%
%% empirical_discrete_mean() returns the mean of the Empirical Discrete PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 September 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer A, the number of values.
%    0 < A.
%
%    real B(A), the weights of each value.
%    0 <= B(1:A) and at least one value is nonzero.
%
%    real C(A), the values.
%    The values must be distinct and in ascending order.
%
%  Output:
%
%    real MEAN, the mean of the PDF.
%
  mean = ( b(1:a) * c(1:a)' ) / sum ( b(1:a) );

  return
end
