"fairness" of the coin. The parameter is the probability that a coin lands heads up ("H") when tossed. can take on any value within the range 0.0 to 1.0. For a perfectly fair coin, . Imagine flipping a fair coin twice, and observing two heads in two tosses ("HH"). Assuming that each successive coin flip is i.i.d., then the probability of observing HH is Equivalently, the likelihood at given that "HH" was observed is 0.25: This is not the same as saying that , a conclusion which could only be reached via Bayes' theorem given knowledge about the marginal probabilities and . Now suppose that the coin is not a fair coin, but instead that . Then the probability of two heads on two flips is Hence More generally, for each value of , we can calculate the corresponding likelihood. The result of such calculations is displayed in Figure 1. Note that the integral of over [0, 1] is 1/3; likelihoods need not integrate or sum to one over the parameter space. Continuous probability distribution Let be a random variable following an absolutely continuous probability distribution with density function (a function of ) which depends on a parameter . Then the function considered as a function of , is the likelihood function (of , given the outcome ). Again, note that is not a probability density or mass function over , despite being a function of given the observation . Relationship between the likelihood and probability density functions The use of the probability density in specifying the likelihood function above is justified as follows. Given an observation , the likelihood for the interval , where is a constant, is given by . Observe that , since is positive and constant. Because where is the probability density function, it follows that . The first fundamental theorem of calculus provides that Then Therefore, and so maximizing the probability density at amounts to maximizing the likelihood of the specific observation . In general In measure-theoretic probability theory, the density function is defined as the Radon–Nikodym derivative of the probability distribution relative to a common dominating measure. The likelihood function is this density interpreted as a function of the parameter, rather than the random variable. Thus, we can construct a likelihood function for any distribution, whether discrete, continuous, a mixture, or otherwise. (Likelihoods are comparable, e.g. for parameter estimation, only if they are Radon–Nikodym