Jump to content

File:OLS example weight vs height residuals.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 360 × 203 pixels, file size: 14 KB)

Summary

Description
English: Example of OLS regression, avg weight regressed on height in population of american women; this graph shows the residuals of the regression.
Date
Source Own work
Author Stpasha

Source code (Mathematica)

H = {1.47, 1.50, 1.52, 1.55, 1.57, 1.60, 1.63, 1.65, 1.68, 1.70, 1.73, 1.75, 1.78, 1.80, 1.83};
W = {52.21, 53.12, 54.48, 55.84, 57.20, 58.57, 59.93, 61.29, 63.11, 64.47, 66.28, 68.10, 69.92, 72.19, 74.46};
fitted[h_] := 128.8128 - 143.1620 h + 61.9603 h^2;
ListLinePlot[Table[{H[[i]], W[[i]] - fitted[H[[i]]]}, {i, 1, 15}], 
 PlotStyle -> {PointSize[0.02], Thickness[0.005]}, 
 Mesh -> All, 
 Filling -> Axis, 
 AxesOrigin -> {1.45, 0},
 PlotRange -> {{1.45, 1.85}, {-0.5, 0.5}}, 
 AxesStyle -> Directive[FontFamily->"Helvetica", 14, Thickness->0.003]
]
Export["wh-residuals.svg", %]

Licensing

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

5 July 2009

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current21:22, 6 July 2009Thumbnail for version as of 21:22, 6 July 2009360 × 203 (14 KB)Stpashacorrected scale
06:24, 6 July 2009Thumbnail for version as of 06:24, 6 July 2009512 × 512 (14 KB)Stpasha{{Information |Description={{en|1=Example of OLS regression, avg weight regressed on height in population of american women; this graph shows the residuals of the regression.}} |Source=Own work by uploader |Author=Stpasha |Date=2009-07-05

The following page uses this file: