Given that the formula for Bernoulli trials are

nCi (p)^i (1-p)^(n-i)

But there's another given formula is
[(n-1) C (i-1)] (p)^i (i-1)^(n-i)

Why is this so?