# Question 1 #This method allows us to have an array instead of having a list of our simulation results. We can also use the chi squared test on an array which allows us to analyze our data further
#2#Multiple testing is essential in order to confirm the results found in an experiment. This allows us to eliminate outside factors when the results are repeatedly similar and allows evidence for someone else to conduct the experiment.
In [ ]:
#3 The Bonferroni correction is the most conservative. A benefit of having a conservative controls have fewer chances of finding significant results however this is because when there are significant results they are very likely not due to random chance.Having less conservative controls may yield more siinificant resukts more often but they could be more likely due to random chance.
#4#⍺ = 0.01.#0.001 (T1 vs T3)#0.003 (T2 vs T3)#0.006 (T3 vs T4)#0.0084 (T1 vs T4)#0.013 (T2 vs T4)#0.34 (T1 vs T2)0.01*(1/4),0.01*(2/4),0.01*(3/4),0.01*(4/4),0.01*(5/4),0.01*(6/4)
(0.0025, 0.005, 0.0075, 0.01, 0.0125, 0.015)
#p(1) less than 𝛂⋅1/m so T1 and T3 are significantly different from eachother and we reject the null#p(2) less than 𝛂⋅1/m, therefore T2 and T3 are significantly different from eachother and we reject the null#p(3) less than 𝛂⋅1/m, therefore T3 and T4 are significantly different from eachother and we reject the null#p(4) less than 𝛂⋅1/m, therefore T1 and T4 are significantly different from eachother and we reject the null.#p(5) greater than 𝛂⋅1/m, therefore T2 and T4 are not significantly different from eachother so we cannot reject the null.#p(6) greater than 𝛂⋅1/m, therefore T1 and T2 are not significantly different from eachother so we cannot reject the null.
#b There is no significant statsitical difference in hand volume between groups bath and/or exercise and the control group. We use the median and a 3 box resampling method with recentering to calculate our p values and confidence intervals. Sample size is n=14
p=sns.displot(a,bins=30,kde=False)p.set(xlabel="Flike",ylabel="Number of times for Flike value or greater")plt.axvline(0.75,color="pink")
<matplotlib.lines.Line2D at 0x7f1586c49a00>
In [ ]:
In [ ]:
#da.sort()Mlower=a#find the bottom 0.5%Mupper=a#find the top 0.5%Mobs=np.median(a)#find the observed medianMupper=2*Mobs-Mlower#find the upper pivotal median bvalueMlower=2*Mobs-Mupper#find the lower pivotal median valuedisplay(,Mlower,,Mupper)#display these found valuesp=sns.displot(a,kde=False,bins=25)#create a histogram of the resamplesp.set(ylabel="Count")plt.axvline(Mlower,color="red");plt.axvline(Mupper,color="green");plt.axvline(Mobs,color="purple");plt.axvline(Fobs,color="orange");plt.axvline(-Fobs,color="orange");
'M Lower : Red Line'
'M Upper: Green Line'
#e#cannot reject null because 0 is within the confidence interval
#f#I would recommend the bath and exercise because it showed the highest difference in results.
File "<ipython-input-2-5ba3c88fe980>", line 1 $ jupyter nbconvert --to pdf notebook.ipynb ^SyntaxError: invalid syntax