Guess the Correlation Coefficient
Loading the math board and drawing, please wait…
This example demonstrates different data sets to help students understand the meaning of the correlation coefficient. Key mathematical concepts include correlation coefficient, linear regression, and linear equations. Using GeoGebra commands such as `SelectedIndex`, `RandomUniform`, and `PMCC`, dynamic data sets are generated and the correlation coefficient is calculated. Suitable for high school and above students to learn about the concept and application of the correlation coefficient.
GeoGebra Commands & Parameters
SelectedIndex(models) → chosenmodelSequence(Max[-4, Min[RandomNormal[0, 1], 4]], i, 1, 100) → xlistNormalRandomUniform(1, 3) → bRandomUniform(0.6, 1.5) → aRandomUniform((-sqrt((b + 4) / a)), sqrt((b + 4) / a), 100) → xlistOtherIf(chosenmodel ≟ 1, xlistNormal, xlistOther) → xlistRandomUniform(-1, 1) → rhoZip(Max[-4, Min[(rho * xx) + (sqrt(1 - rho^(2)) * RandomNormal[0, 1]), 4]], xx, xlist) → ylistNormalZip(Max[-4, Min[f(xx) + RandomNormal[0, c], 4]], xx, xlist) → ylistOtherIf(chosenmodel ≟ 1, ylistNormal, ylistOther) → ylistZip((xx, yy), xx, xlist, yy, ylist) → xylistPMCC(xylist) → rFitLineY(xylist) → rlinePolygon(Corner[2], Corner[3], (0.75 * Corner[3]) + (0.25 * Corner[4]), (0.75 * Corner[2]) + (0.25 * Corner[1])) → panel, g, h, i, jIf(abs(guess - r) > 0.2, 0, If[0.1 < abs(guess - r) ≤ 0.2, 1, If[abs(guess - r) ≤ 0.1, 2, 3]]) → guessstateTextfield(guessinput) → InputBox1