56. Experimental Probability

Easy

A theoretical probability is exact; an experimental one is estimated from what actually happened:

P^(A)=times A occurrednumber of trials\hat P(A) = \frac{\text{times } A \text{ occurred}}{\text{number of trials}}

observations is a list of recorded outcomes and event is a set. Return the fraction of observations that fall inside the event.

Input

observations = [1, 2, 2, 6, 3]
event = {2, 4, 6}

Output

0.6
Implement solve(...)