The Chi-squared test compares observed counts to expected counts to see if differences are significant. We start with observed data, calculate expected counts based on row and column totals, then compute the Chi-squared statistic as the sum of squared differences divided by expected counts. Next, we find the p-value from the Chi-squared distribution with appropriate degrees of freedom. If the p-value is less than 0.05, we reject the null hypothesis, meaning the observed data significantly differs from expected. Otherwise, we fail to reject it, meaning no significant difference. In the example, observed and expected counts are equal, so the Chi-squared statistic is 0 and p-value is 1, indicating no difference.