A coin is tossed 7 times. What is the probability of getting four heads. My teacher said that there is a formula involved but i don't know which one. How do i set it up?

With a fair coin the probability of a given 7-flip series is equal to ANY 7-flip series. That is, P(HHHHTTT) = P(TTTHHHH) = P(THTHTHT)....

There are 2^7 = 128 possible 7-filp series. This is the denominator.

There are 4-choose-7 ways to have a 4 heads in 7 filps. 4-choose-7 is 7!/(4!*(7-4)!) = 35.

So, the probability is 35/128

To determine the probability of getting four heads when a coin is tossed seven times, you can use the binomial probability formula. This formula calculates the probability of a specific number of successes (heads) in a fixed number of Bernoulli trials (coin tosses).

The binomial probability formula is:

P(X=k) = C(n, k) * p^k * (1-p)^(n-k)

Where:
P(X=k) is the probability of getting exactly k successes (heads),
C(n, k) is the number of combinations of n items taken k at a time,
p is the probability of getting a success (heads) on a single trial,
n is the total number of trials (coin tosses), and
k is the number of successes (heads) you are interested in.

In this case, you want to find P(X=4) for n=7 tosses, so you will use k=4. The probability of flipping a head is 1/2, so p=1/2.

Let's plug in the values:

P(X=4) = C(7, 4) * (1/2)^4 * (1-(1/2))^(7-4)

C(7, 4) can be calculated as follows:

C(7, 4) = 7! / (4! * (7-4)!) = 7! / (4! * 3!) = (7 * 6 * 5) / (3 * 2 * 1) = 35

Now we have all the values we need:

P(X=4) = 35 * (1/2)^4 * (1/2)^3

Simplifying further:

P(X=4) = 35 * (1/16) * (1/8)

P(X=4) = 35/128

Therefore, the probability of getting four heads in seven coin tosses is 35/128.