In a certain experiment, the probability that event A occurs is \(\frac{2}{3}\) and the probability that event B occurs is \(\frac{1}{2}\). If the probability that both A and B occur is \(\frac{1}{4}\), what is the probability that event A has occurred given that B has occurred?