user3566254
user3566254

Reputation: 1

How can I set up a t-test that tests whether one sample is larger than another in R?

I was given two sets of measurements of air particulates (24 samples, taken hourly) at two locations. I know how to test whether the means are the same (they are not), but I'm tasked with testing the Ho that the particulate concentration is higher at (building1_air) than it is at (building2_air). This is my first time working with R software (or any, for that matter). What should the t-test command (if that's the right term) look like to compare the two sets of samples? I'm grateful for any help.

Upvotes: 0

Views: 115

Answers (3)

Ian Fellows
Ian Fellows

Reputation: 17348

Are these counts of particulates? if so, a poisson test might be what you are looking for. for a single sample you can use the function poisson.test to create confidence intervals. To compare rates, you can use binom.test

Upvotes: 0

Davide Passaretti
Davide Passaretti

Reputation: 2771

t.test(building1_air,building2_air, alternative="g")

because your Alternative Hyp. is not the default one (wich is two tail test)

Upvotes: 1

bgschiller
bgschiller

Reputation: 2127

From Quick-R:

t.test(building1_air,building2_air)

Upvotes: 0

Related Questions