猜相关系数 by University of Melbourne School of Mathematics and Statistics

猜相关系数 by University of Melbourne School of Mathematics and Statistics
几何画板及绘图内容加载中,请稍等……
2016-06-08 13:25
这是一个猜相关系数r的游戏,通过散点图展示双变量数据。核心数学概念涉及相关系数。使用了GeoGebra命令如SelectedIndex, Sequence, RandomUniform等。适合高中数学教学或统计学学习。

GeoGebra 命令及参数

  1. SelectedIndex(models) → chosenmodel
  2. Sequence(Max[-4, Min[RandomNormal[0, 1], 4]], i, 1, 100) → xlistNormal
  3. RandomUniform(1, 3) → b
  4. RandomUniform(0.6, 1.5) → a
  5. RandomUniform((-sqrt((b + 4) / a)), sqrt((b + 4) / a), 100) → xlistOther
  6. If(chosenmodel ≟ 1, xlistNormal, xlistOther) → xlist
  7. RandomUniform(-1, 1) → rho
  8. Zip(Max[-4, Min[(rho * xx) + (sqrt(1 - rho^(2)) * RandomNormal[0, 1]), 4]], xx, xlist) → ylistNormal
  9. Zip(Max[-4, Min[f(xx) + RandomNormal[0, c], 4]], xx, xlist) → ylistOther
  10. If(chosenmodel ≟ 1, ylistNormal, ylistOther) → ylist
  11. Zip((xx, yy), xx, xlist, yy, ylist) → xylist
  12. PMCC(xylist) → r
  13. FitLineY(xylist) → rline
  14. Polygon(Corner[2], Corner[3], (0.75 * Corner[3]) + (0.25 * Corner[4]), (0.75 * Corner[2]) + (0.25 * Corner[1])) → panel, g, h, i, j
  15. If(abs(guess - r) > 0.2, 0, If[0.1 < abs(guess - r) ≤ 0.2, 1, If[abs(guess - r) ≤ 0.1, 2, 3]]) → guessstate
  16. Textfield(guessinput) → InputBox1