I'm trying to use R's built-in stats package to statistically measure the difference between what I observe and what I expect. I believe the best test to use is a t-test (using t.test
) - however that seems to just compare means. Here's my simple data:
brightness_1 <- c(1,1,2,2)
brightness_2 <- c(8,9,8,10)
brightness_combined <- c(70, 71, 71, 74)
Let's say I take a lightbulb and put some energy into it, and measure the brightness. I do it four times and the results are brightness_1
. Then I increase the energy and measure four more times - that's brightness_2
.
Okay - so if I combine however much energy I used for both experiments, I would expect to see the brightness is the combination. Maybe I'd expect something like an average of ~10. However, what I see is that my values are much higher than expected : brightness_combined
.
How can I measure this? If I use a t-test with the average of brightness_combined set as the 'mu' value, it will compare the means....but I want it to compare the sum of brightness_1 and brightness_2. If I were to sum them beforehand, I lose the number of samples, right?