Possible solution: A survey could be asking the girls and boys in your class do you own a pet. For a class of 40 students, the results could then be:

\(\begin{array}{|c|c|c|}
\hline
&Boy&Girl&Total\\
\hline
Yes & 5&10&15 \\
\hline
No& 14&11&25\\
\hline
Total&19&21&40 \\
\hline
\end{array}\)

Dividing each cell of the table by 40 will then give the marginal and joint frequencies:

\(\begin{array}{|c|c|c|}
\hline
&Boy&Girl&Total\\
\hline
Yes & 0.125&0.250&0.375 \\
\hline
No& 0.35&0.275&0.625\\
\hline
Total&0.475&0.525&1 \\
\hline
\end{array}\)