如何在 Google 表格中计算条件相关性
这是我的屏幕截图和电子表格的链接。我正在尝试计算学生的通过次数与成绩之间的相关性,但仅限于出勤率超过 60% 的学生。我不确定我的公式有什么问题。 工作表
Here is my screenshot and link to the spreadsheet. I am trying to calculate the correlation between number of passes students take and their grades, but only for those with greater than 60% attendance. I am not sure what is wrong with my formula.
Sheet
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的公式有几个问题,包括您使用范围引用(例如“B2:B98”),其中 QUERY 仅调用“B”;但我不会告诉您哪里出了问题,而是分享应该正确且对您来说更容易的内容:
=ArrayFormula(CORREL(FILTER(B2:B,A2:A>) 0.6),FILTER(C2:C,A2:A>0.6)))
如果您想坚持使用 QUERY:
=ArrayFormula(CORREL(QUERY(A2:C,"当 A > 0.6 时选择 B"),QUERY(A2:C,"当 A > 0.6 时选择 C")))
There are several things wrong with your formula, including that you are using range references (e.g., "B2:B98") where QUERY only calls for "B"; but rather than telling you what is wrong, I'll just share what should be right as well as easier for you:
=ArrayFormula(CORREL(FILTER(B2:B,A2:A>0.6),FILTER(C2:C,A2:A>0.6)))
If you want to stick with QUERY:
=ArrayFormula(CORREL(QUERY(A2:C,"Select B WHERE A > 0.6"),QUERY(A2:C,"Select C WHERE A > 0.6")))