What is the probability that I would get either all heads or tails in n coin tosses.
I know, for example, in $4$ tosses, the probability is $\left(\frac12\right)^4=\frac1{16}$ to get either all heads or tails. But how do I generalize it?
Ty for the assistance!