Python全系列 教程
3567个小节阅读:5929.9k
目录
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
为保证数据质量,接受过CCSS访问的受访家庭半年内不会再进行访问,但半年之后会进行抽样回访。在 2030年12月,项目组对2030年4月的成功访问家庭进行了回访,共采集了88例有效样本,现希望比较 这些样本的信心值是否发生变化,数据见表单CCSS_pair
xxxxxxxxxx
ccss_p = pd.read_excel("CCSS_sample.xlsx", sheet_name = 'CCSS_pair')
ccss_p.head()
xxxxxxxxxx
scipy.stats.ttest_rel(
a, b : array_like
nan_policy : {'propagate', 'raise', 'omit'}
)
xxxxxxxxxx
ccss_p.loc[:, ['index1', 'index1n']].describe()
xxxxxxxxxx
# 用相关分析确认配对信息是否的确存在
ss.pearsonr(ccss_p.index1, ccss_p.index1n)
xxxxxxxxxx
# 配对t检验
ss.ttest_rel(ccss_p.index1, ccss_p.index1n)
xxxxxxxxxx
# 直接求出差值并进行单样本t检验
ss.ttest_1samp(ccss_p.index1 - ccss_p.index1n, 0)
1.配对t检验的SciPy实现的方法是:
A ss.ttest_rel(ccss_p.index1, ccss_p.index1n)
B ss.pearsonr(ccss_p.index1, ccss_p.index1n)
C tconfint_mean()
D ttest_ind()
1=>A