Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started