product of likelihoods vs PMF I am trying to understand better how the binomial PMF relates to likelihood. My understanding is that the the product of likelihoods from many trials is equal to the overall likelihood of observing all of the trials:
$\ell = \prod_{i=1}^nP(k_i, p)$ 
     where $k_i$ is the success or failure for the $i$th trial, should be equivalent to the result of the binomial PMF for $k$ successes and $n$ trials:
$\ell = P(k; n, p)$
However, when I compute this (using MATLAB), I find this not to be true. For instance: 
binopdf(1, 1, 0.5) *  binopdf(1, 1, 0.5) * binopdf(0, 1, 0.5) != binopdf(2, 3, 0.5)
This may be a very basic question, but can someone help me understand why this doesn't work like I expect? Thanks

You need to remember that there are different results for individual trials that all result in a total of $k$ successes. For your example, the LHS = 0.125, while the RHS = 0.375 = 3*LHS. Why the factor of 3? We really have:

binopdf(1, 1, 0.5) *  binopdf(1, 1, 0.5) * binopdf(0, 1, 0.5)
  +   binopdf(1, 1, 0.5) * binopdf(0, 1, 0.5) * binopdf(1, 1, 0.5)
  +   binopdf(0, 1, 0.5) * binopdf(1, 1, 0.5) *  binopdf(1, 1, 0.5) 
= 3*binopdf(1, 1, 0.5) *  binopdf(1, 1, 0.5) * binopdf(0, 1, 0.5)

The extra factor you'll need is given by the binomial coefficient. See http://mathworld.wolfram.com/BinomialDistribution.html.
