That depends. If you have a finite data set, you would add up all the points you have and divide by the total count.
Or, if you are working with pure distributions, the mean is the same as the expected value of the corresponding random variable.
Suppose you have a discrete random variable
with a given probability mass function
, then the mean is given by
which would mean you take all the possible probability for the event that
, multiply each by that
, and add them together.
If the distribution is continuous, say a random variable
that has probability distribution function
over some support
, then the mean is