Adaeze:
Your question is "If you flipped a coin 3 consecutive times, what would be the probability that all three results were the same?"
You do NOT say that the coin is fair. So let us assume that the probability it falls heads is p and that it falls tails in 1 - p. 0<p<1. Also your question says nothing about HOW the coin is tossed, independently, or otherwise. For example, you might say, for example, that if the first filp results in a "head", the "tail" side of the coin is is covered with a heavy coat of transparent glue and then flipped. Then the flips will not be independent. DO you understand? So, to make things simple, let us assume that the flips are done independently. Below are the eight outcomes and their probabilities:
Outcome Probability
HHH p3
HHT p2(1-p)
HTH p(1-p)p = p2(1-p)
HTT p(1-p)2
THH (1-p)p2
THT (1-p)p(1-p) = p(1-p)2
TTH (1-p)2p
TTT (1-p)3
YOU ARE INTERESTED IN the probability of the EVENT that all three results were the same. By definition the probability of an event is the sum of the probabilities of the "elementary" events (outcomes) that comprise it. Your event "all three results were the same" consists of the elementary events {HHH, TTT}
Hence its probability is P(HHH) + P(TTT) = p3 + (1-p)3
By the way, if you ASSUME that the coin is fair and the flips are independent then this porbability is
(1/2)3 + (1/2)3 = 1/4 = 0.25.
But, if, say, your coin is "loaded" in favor of tails, say p = 0.2 and 1 - p = 0.8, the same probability (of all three results being the same) is (0.2)3 + (0.8)3 = 0.008 + 0.512 = 0.52.
Always keep track of the assumptions you need to make.
Dattaprabhakar (Dr.G.)
Phillip R.
08/21/14