Finding Outliers in a Scatter Diagram
Loading the math board and drawing, please wait…
This example demonstrates how to identify outliers in a scatter diagram. Key mathematical concepts include statistical methods for outlier detection. Construction highlights the use of GeoGebra commands such as Sequence, Max, Min, MeanY, MeanX, etc., for data sorting and statistical analysis. Suitable for high school and above students or teachers.
GeoGebra Commands & Parameters
Sequence(RandomPoisson[seed], k, 1, (2 * size)) → RandListSequence((Element[RandList, (2 * k)] * 10^((-Acc2))), k, 1, size) → YvalsSequence((Element[RandList, (2 * k) - 1] * 10^((-Acc1))), k, 1, size) → XvalsMax(Xvals) → Max1Min(Xvals) → Min1Sequence((Element[Xvals, k], Element[Yvals, k]), k, 1, size) → ActPtsMeanY(ActPts) → YbarMeanX(ActPts) → XbarSXY(ActPts) → ActSxySXX(ActPts) → ActSxxSequence(((Element[Xvals, k] - Xbar) * Cos) + ((Element[Yvals, k] - Ybar) * Sine), k, 1, size) → XrotSequence((Element[Xrot, k] * Cos) + Xbar, k, 1, size) → XprojMax(Xproj) → Max3Min(Xproj) → Min3Min(Yvals) → Min2Sequence((Element[Xrot, k] * Sine) + Ybar, k, 1, size) → YprojMin(Yproj) → Min4Max(Yvals) → Max2Max(Yproj) → Max4Max(Max2, Max4) → MaxYMax(RightEnd - LeftEnd, TopEnd - BotEnd) → StrFacMax(Max1, Max2) → Max0Min(Min1, Min2) → Min0Sequence(((-(Element[Xvals, k] - Xbar)) * Sine) + ((Element[Yvals, k] - Ybar) * Cos), k, 1, size) → YrotSequence(adapt1(Element[Xvals, k]), k, 1, size) → XgrphSequence(adapt2(Element[Yvals, k]), k, 1, size) → YgrphSequence(k, k, Min1, Max1, 10^((-Acc1))) → DomainSort(Intersection[Domain, Xvals]) → RangeCountIf(x < Max1 + 1, Range) → RangeCountSequence((Element[Xgrph, k], Element[Ygrph, k]), k, 1, size) → GrphPtsSegment((-1.414, -1.414), (0, 0)) → LLCSequence(Segment[(-0.5, (k * Stretch2)), (0.5, (k * Stretch2))], k, 0, TopEnd - BotEnd, (0.5 * 10^((-Acc2) + 1))) → VticsFitLineY(ActPts) → FLMean(Xgrph) → XmeanMean(Ygrph) → YmeanSequence(((-(Element[Xgrph, k] - Xmean)) * sin(Theta)) + ((Element[Ygrph, k] - Ymean) * cos(Theta)), k, 1, size) → Yrot1Sequence(abs(Element[Yrot, k]), k, 1, size) → YabsSequence(((Element[Xgrph, k] - Xmean) * cos(Theta)) + ((Element[Ygrph, k] - Ymean) * sin(Theta)), k, 1, size) → Xrot1Sequence(((Element[Xrot1, k] * cos(Theta)) + Xmean, (Element[Xrot1, k] * sin(Theta)) + Ymean), k, 1, size) → RegProjSequence((Element[Xproj, k], Element[Yproj, k]), k, 1, size) → ActPrjPtsSequence(adapt1(Element[Xproj, k]), k, 1, size) → XprgrSequence(adapt2(Element[Yproj, k]), k, 1, size) → YprgrSequence((Element[Xprgr, k], Element[Yprgr, k]), k, 1, size) → GrphPrjPtsSequence(Segment[Element[GrphPts, k], Element[GrphPrjPts, k]], k, 1, size) → ProjLinesSequence(Element[Xgrph, k] - 2, k, 1, size) → XlblSequence(If[Element[Yabs, k] ≠ 0, Element[Yrot, k] / Element[Yabs, k], 1], k, 1, size) → LblDirSequence(Element[Ygrph, k] + (Element[LblDir, k] * 1.5) - 0.5, k, 1, size) → YlblSequence(Text[Element[Yabs, k], (Element[Xlbl, k], Element[Ylbl, k])], k, 1, size) → DstLblMax(Yabs) → MaxDistSequence(If[Element[Yabs, k] ≟ MaxDist, Text["OUTLIER", (Element[Xgrph, k] - 3, Element[Ygrph, k] + (Element[LblDir, k] * 3) - 0.5)], Text[" "]], k, 1, size) → OutlierSegment(AxesOrigin, HAE) → HaxisSegment(AxesOrigin, VAE) → VaxisFitLineY(GrphPts) → RegLineIntersect(Right, RegLine) → BSequence(Segment[((k * Stretch1), -3.5), ((k * Stretch1), -2.5)], k, 0, RightEnd - LeftEnd, (0.5 * 10^((-Acc1) + 1))) → HticsSequence(Text[k, (adapt1(k) - 0.9, -5.5)], k, LeftEnd, RightEnd, 10^((-Acc1) + 1)) → HlabSequence(Text[k, (-4.5, adapt2(k)) - 0.5], k, BotEnd, TopEnd, Step) → Vlab
AI Drawing Prompt Reference
Create a scatter plot and identify outliers. First, generate a set of random data points, then calculate the maximum and minimum values, mean, and variance for both X and Y. Rotate the points, compute their projections, and find the maximum and minimum values of these projections. Finally, draw a regression line and label the distance of each point to the line.
The prompt above was compiled from the original drawing commands and is for reference only.