I am having a really rough time figuring out how this expected value was found in this Chi Square problem.

272 flies had long normal wings

60 flies had dumpy wings

I know it's going to be a 3:1 ratio, and I know that 272 and 60 are my observed variables.

This is how the table is set up thus far:

O E

272 249
60 83
Total: 332 332

How the heck did they figure out the expected values?

Use the Chi-square (X^2) method.

X^2 = ∑ (O-E)^2/E, where O = observed frequency and E = expected frequency.

∑ = sum of all the cells.

E = (column total * row total)/grand total

df = n - 1, where n = number of cells

Look up value in X^2 table in the back of your textbook.