Question: import scipy.stats as stats import numpy as np young = [ 2 9 , 3 7 , 3 3 , 2 7 , 2 8
import scipy.stats as stats
import numpy as np
young
old
# Independent samples
printIndependent
# Less than test
printLessthan"
# Point estimate
ptest npmeanyoung npmeanold
printroundptest,
# Standard error
stderr npsqrtnpvaryoung ddoflenyoung npvarold ddoflenold
printroundstderr,
# Test statistic
teststat npmeanyoung npmeanold stderr
printroundteststat,
# Degrees of freedom
df lenyoung lenold
printintdf
# Critical value
critval stats.tppf df
printroundcritval,
# Conclusion
printYes
# Margin of error
moe stderr critval
printroundmoe
# Lower confidence bound
lcb ptest moe
printlcb
# Confidence interval check
printYes
# Possible error
printType II
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
