I use a simulted dataset that showed how many people on two teams, Team A and Team B, ate cake or ice cream. I wanted to see if there was a relationship between the dessert that someone chose and their team. I calculated the expected values for each cell in the contingency table. This was done by multiplying the number of people on each team by the overall proportion of people who ate cake or ice cream. I calculated the chi-squared statistic for each cell in the contingency table. This was done by subtracting the observed value from the expected value, squaring the difference, and then dividing by the expected value. The sum of the chi-squared statistics for each cell in the contingency table was 81.5. I then converted this value to a probability using the ChiSq.Dist function in Excel. The probability was very small, which means that the relationship between dessert choice and team was statistically significant. In other words, there is a relationship between what team you're on and what dessert you chose. This could be because the teams have different cultures or preferences.