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:
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?
You must to evaluate the energy like a continuous variable instead a categorical one... You must evaluate an exponential model or a polynomic one (second level maybe)...
I wasn't familiar with the exp feature before, thank you for the example!
However, isn't this ignoring that the 'expected' is supposed to be brightness_1 + brightness_2 ? In my own experiment I expect the combined_brightness to be the average of (1,1,2,2) + average of (8,9,8,10) - meaning my actual observation (70, 71, 71, 74) is much higher compared to that sum. But I think here if I'm correct it's the actual observation compared to the exponential model of each drug?