# Mean comparison for statistical significance

I was told to come here by a friend to ask a stats question.

I took Social Stats and Methods of Social Research about 4 years ago and to be honest, I don't remember much about it. Now I'm writing a research paper and I can't find any basic tutorials to assist with a problem that would probably be pretty simple to a Stats major. So I'm running tests on the lunar effect, and I guess the qualitative details aren't important.

So In "Group F" I have a sample size of 44 Days, and when measuring incidence within the days, the total was Σ=1593, which generates a mean of 36.20 per day on average. In "Group J" I have a sample size of 27 Days, and when measuring incidence within the days, the total was Σ=997, which generates a mean of 36.93 per day on average. I'm trying to see if there is a statistically significant difference between the means comparing Group F and Group J.

I guess CL=95% or α=0.05 (I'm not sure) and I don't remember anything about standard deviation.

So my question is, what is my step by step process to figure this out (becuase i have to do it 9 more times) and how do I find out my standard deviation and CL/α?

Edit) Greg Snow, I'll answer the questions first.

Yes, I have each individual number for each day. So tell me if this is how you find the standard deviation. 1) Subtract the mean from each numerical result from each day. 2) Square all of those values. 3) Add the results 4) Take the square root of that total... That's correct, right?

There where certainly no 0's. lowest number I ever saw was something in the high 20's (I don't have the numbers in front of me). Highest was around low 70's (those maxes an mins are considering both groups)...

No. Each day is independent and isn't dependent on days before or after.

The days don't overlap. The number of days is more related to their frequency of occurrence (full moon nights vs. non-full moon nights). I guess you could call full moon days predetermined lol. But the non-full moon days are the 5th, 10th, 15th, 20th, and 25th day after the full moon (using a 3 full moon day method).

EDIT) Ok I see. thank you for your help! However, I have a question. What's the difference between dividing the variance by N or N-1? I know it's Population vs. Sample, but how do you know which to use?

If both of those samples look normal then you could use a 2 sample t-test. This tests the null hypothesis that there is no difference between the means of your two samples. It seems reasonable to assume the variance of each population is the same, but the sample sizes are slightly different.

$$t = \frac{\overline{X}_1 - \overline{X}_2}{S_{X_1X_2} \cdot \sqrt{\frac{1}{n_1}+\frac{1}{n_2}}}$$

where

$$S_{X_1X_2} = \sqrt{\frac{(n_1-1)S_{X_1}^2+(n_2-1)S_{X_2}^2}{n_1+n_2-2}}$$

$\overline{X}_1$ and $\overline{X}_2$ are the sample means for each group $S_{X_1,X_2}$ is the pooled standard deviation, $n_1$ and $n_2$ are the sample sizes of each group, and $S_{X_1}$ and $S_{X_2}$ are the sample standard deviations of each group.

You can do this in R using the function t.test, which has a number of options, including the ability to return confidence intervals and such.

You may need to consult with a local statistician. This problem may be simple and can be done using teqniques that you learned and just need to refresh yourself on. But, it could also be that there are issues that take this well beyond what you would have learned and could do yourself (without mastering several more stats classes). Some of the issues that could complicate your study, but are not clear from your question include:

Do you have the raw numbers for each day? or just the totals? (with just the totals this could still be analyzed using a comparison of Poissons if assumptions of a Poisson distribution are reasonable).

If you have data from individual days, how are the measumerments distributed? Are there a lot of 0's and then some big numbers? (zero-inflated models) or do most of the numbers cluster in the general area of the mean?

Was the data measured on consequtive days? Is there a chance that measurements from days close together would be more related than measurements from days further apart? (non-independence)

Do the days of the 2 groups overlap? Why are the number of days different between the groups? Where the number of days predetermined? or were the number of days also random and could have been different in a different study?

How were the groups determined?

Are these samples from a finite population?

Are there other variables that you want to adjust for?

These and other questions would be best discussed with a statistician to help you decide if a simple analysis is sufficient or if something more needs to be done and how best to interpret the results.

Edit

You are missing the step "divide by n-1" before taking the square root in your description of finding the standard deviation. Actually the best approach is to use a statistical software package, @zack mentioned R which is a very good tool and you can't beat its price. And if you use R (or another stats package) then the whole process can often be done in one step.

From your description a t-test, as described by @zach, would be reasonable. However if you are sampling groups of 3 days together (full moon), then I would expect that there would be similarities within the cluster of 3 (similar weather, temperature, other outside factors). If that is the case then the t-test may not be appropriate (it assumes everything independent) and you would need to either adjust for these other influences (regression models) or use a technique that takes into account the clustering.

There could be other issues as well, which is why I suggest consulting with a statistician.