Variance of experimental data, compared to Theory

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 4K views
saad87
Messages
83
Reaction score
0
I'm looking for a way to compare experimental and theoretical data and determining if it obeys a certain law.

In particular, I'm writing a computer program that does this and at the moment what I'm doing is, I'm calculating the ratio of each reading with the theoretical result and calculating the standard deviation of the various resultant ratios.

I compare each ratio with the mean to see if its within one standard deviation. Are there any better approached than this? I'm not really a mathematician, and am more of a programmer so any help would be much appreciated.
 
Physics news on Phys.org
saad87 said:
I'm looking for a way to compare experimental and theoretical data and determining if it obeys a certain law.

Welcome to the world of statistics!

Some more information about the problem is needed. In particular, are you looking to test a formula to see how accurate it is (e.g. whether the errors are "acceptable"), or are you looking to confirm is a sample of random values has a specific distribution?
 
bpet said:
Welcome to the world of statistics!

Some more information about the problem is needed. In particular, are you looking to test a formula to see how accurate it is (e.g. whether the errors are "acceptable"), or are you looking to confirm is a sample of random values has a specific distribution?

Basically I'm looking to confirm Benford's law in various files the user wishes to open.
 
If you are looking to confirm Benford's Law, then you have the expected distribution of numbers starting with 1,2,3,...,9, and you have the actual distribution given by your data.

I think a Chi-Square test for goodness of fit would be good here.
 
I just tried the Chi-square test, but the various online calculators basically tell me the total of my Observed and Expected frequences isn't the same. Is this because this test will fail if the observed freq. are too low than expected?

Thanks for all the help.
 
If your total expected does not equal your total observed, you have made some mistake in setting things up.

If you have [tex]N[/tex] (observed) numbers in total and the fraction predicted by Benford's Law to start with i is [tex]f_i[/tex], then the number expected to start with i is [tex]e_i = f_i \cdot N[/tex]. Since the [tex]f_i[/tex]'s sum to 1, the [tex]e_i[/tex]'s sum to [tex]N[/tex].