Inference with Linear Regression (Work in Progress)

Inference with Linear Regression (Work in Progress)
Loading the math board and drawing, please wait…
2016-05-04 08:48
① This example demonstrates an interactive visualization for statistical inference in linear regression, including scatter plots, fitted lines, and confidence intervals. ② Core mathematical concepts include linear regression, least squares, Pearson's correlation coefficient (PMCC), standard deviations, sampling distribution of slope, and confidence intervals in inferential statistics. ③ Construction highlights: using GeoGebra commands such as Segment, Point, Polygon, FitLineY, SDY, SDX, PMCC, along with text fields and sliders, to dynamically adjust data points and observe changes in the regression line and computed statistics. ④ Suitable for high school or college statistics courses, it serves as a tool for teachers to demonstrate and students to explore the inference process in linear regression.

GeoGebra Commands & Parameters

  1. Segment((x(F), (0.5 * (y(F) + y(D)))), (x(E), (0.5 * (y(E) + y(G))))) → c
  2. Point(c, 1) → H
  3. Polygon(D, F, G, H, E) → poly1, d, e, g, h, i
  4. PointIn(poly1) → C
  5. Point(xAxis) → B
  6. Point(xAxis) → A
  7. Sort(Zip[(a, RandomNormal[f(a), σ]), a, RandomUniform[x(A), x(B), N]]) → list5
  8. Sequence(RandomElement[list5], k, 1, n) → list1
  9. FitLineY(list1) → a
  10. FitLineY(list5) → b
  11. SDY(list5) → SD_y
  12. SDX(list5) → SD_x
  13. Name(SD_y) → D1
  14. Name(β) → C1
  15. Textfield(n) → InputBox1
  16. Textfield(maxSlope) → InputBox2
  17. Textfield(maxSD) → InputBox3
  18. PMCC(list1) → r