5 coins are put in a bag. 3 of the coins are weighted with the probability of flipping heads being three times as great than the probability of flipping tails; the remaining coins are fair. One of these coins is selected at random and then flipped once. What is the probability that a weighted coin was selected given that heads was flipped?