I started R only a bit ago. So I would like to ask you if I am doing t-test right with my purpose.
I have two data set like this.
> head(da1)
LiefertagDeliveryDate Price Hour
1 2015-12-31 28.82 1
25 2015-12-30 42.97 1
49 2015-12-29 43.38 1
73 2015-12-28 48.54 1
97 2015-12-27 46.36 1
121 2015-12-26 42.68 1
And,
> head(sp1)
# A tibble: 6 x 3
Date Hour Price
<dttm> <chr> <dbl>
1 2015-12-31 1 16.06
2 2015-12-30 1 28.51
3 2015-12-29 1 20.59
4 2015-12-28 1 27.94
5 2015-12-27 1 13.42
6 2015-12-26 1 -36.07
So basically everyday, from 2015-12-31 down to 2011-01-01 for hour 1. I would like to conduct t.test for those data to compare the average of price for hour 1 in the each data set and see if it is significant.
For this purpose, I conducted,
t.test(da1$Price, sp1$Price, data=rp1, var.equal=TRUE, conf.level = 0.95,
alternative = 'two.sided', paired=F)
(For equal variance with 95% confidence level for two sided. not paired because it is two different data) Did I do it right for my purpose? I am very new with R, so I am not really sure if I did good work and since I am a programming beginner, strings and logicals all of that sound very foreign which makes me hard to understand the description in help.
Thank you for your kind advise in advance.
Have a great day people!