File:OLS example weight vs height residuals.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 360 × 203 pixels, file size: 14 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    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

    14,713 byte

    6760f4736c9b6bdd406a049f58900e7602f83b3f

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current22:22, 6 July 2009Thumbnail for version as of 22:22, 6 July 2009360 × 203 (14 KB)wikimediacommons>Stpashacorrected scale

    There are no pages that use this file.