I am a bit confused regarding the Shapiro (and Anderson-Darling) test. I have 2 datasets with about 100 columns each and would like to perform a t-test between columns (meaning column 1 in dataset 1 tested against column 1 in dataset 2 and so on).
I know that the t-test is robust but I still would like to test that the data is at least somewhat normally distributed.
So please correct me if I'm wrong but our null hypothesis for the Shapiro is that the data is normally distributed vs alternative hypothesis that the data is not.
So if I get a p-value that is $<0.05$ we reject the null hypothesis and my data is NOT normally distributed. If I get a p-value $> 0.05$ we do not reject the null hypothesis but that doesn't mean the data is normally distributed anyway right?
So how do I know if it is? Should I then always check the qq-plot if the p-value is $>0.05$? Or maybe the Shapiro test is not even used for this kind of thing?
I read this post but I'm still having a hard time understanding. If you have please also post sources since this is for my thesis.
Example of my data (from the first column in the first dataset) in R.
data1<-c(5.43, 5.58, 5.83, 5.76, 5.73, 6.02, 5.89, 6.21, 5.84, 5.58, 5.21, 5.96, 6.12, 5.91, 6.35, 6.35, 6.46, 6.41, 5.78, 5.96, 5.46, 5.91, 5.68, 5.80, 5.49, 5.50,
5.83, 5.61, 6.18, 5.18, 6.53, 7.23, 6.21, 6.31, 6.86, 6.62, 6.95, 6.00, 6.29, 6.77, 5.25, 6.41, 6.43, 5.32, 6.17, 6.42, 6.19, 5.92, 6.20, 5.94, 5.38, 5.93,
6.39, 5.79, 6.80, 5.68, 6.73, 6.68, 5.77, 5.95, 5.95, 6.48, 6.30, 6.15, 5.64, 5.21, 5.84, 5.90, 5.54, 6.59, 5.93, 6.48, 5.69, 6.52, 6.62, 5.78, 6.50, 6.68,
5.35, 5.84, 6.08, 5.85, 5.91, 5.78, 6.52, 5.77, 6.25, 6.11, 6.64, 6.20, 5.45, 5.20, 6.41, 6.95, 6.45, 5.58, 6.54, 5.89, 5.21, 6.35, 5.73, 6.34, 6.61, 5.99,
6.07, 6.48, 6.31, 6.92, 7.22, 7.90, 6.17, 5.97, 6.22, 6.00, 5.91, 5.88, 6.79, 6.50, 5.64, 6.02, 6.20, 5.74, 6.12, 5.47, 6.31, 6.58, 6.71, 7.35, 6.54, 5.89,
5.98, 7.62, 6.48, 6.26, 6.51, 6.02, 6.06)
plot(density(data1))
shapiro.test(data1)
qqnorm(data1);qqline(data1, col = 2)
I think the density and qq plot says it is normally distributed but since I rejected the null hypothesis it is not?