You have the correct method but the equation is supposed to be a summation, meaning in an ideal situation you should have many tries with varying numbers of throws, each with different observed and expected values.
I claim that I am a very good dart's player, and that I can hit the bulls-eye of a dart board with probability 0.785 each time I throw a dart. You decide to check my claim in an experiment. In 60 throws of a dart I hit the bulls-eye 48 times. What would be the goodness-of-fit test statistic of the null hypothesis that I am telling the truth?
I get
Expected
Bulls eye 47.1
Miss 12.9
(o-e)^2/e
bully eye 0.017197
miss 0.062797
sum=0.079988
Is this right, cos I think that my method may be wrong?
You don't use a chi-squared test for this. Under the null hypothesis the number of hits has a binomial distribution B(60,0.785).
Now the question is is 48 hits from 60 throws improbably far from the expected number of ~=47.1. Well as the SD of the number of hits is ~=3.1 for this binomial distribution, so without doing any test we know that 48 is not significantly different from 47.1
CB