File:Linear regression.svg

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Original file(SVG file, nominally 438 × 289 pixels, file size: 71 KB)

Summary

Icon Mathematical Plot.svg
This diagram was created with Sage.
Description
English: Random data points and their linear regression. Created with the following Sage (http://sagemath.org) commands:
X = RealDistribution('uniform', [-20, 80
])

Y = RealDistribution('gaussian', 1.5)

f(x) = 3*x/20 + 5

xvals = [X.get_random_element() for _ in range(100)]

data = [(x, f(x) + Y.get_random_element()) for x in xvals]

m, b = var('m b')

g(x) = m*x + b

g(x) = g(x).subs(find_fit(data, g, solution_dict=True))

p = list_plot(data) + plot(g, (x, -20, 60), color='red')

p.save('linear_regression.svg')
Date
Source Own work
Author Sewaqu
Other versions

Derivative works of this file: Sedm zakladnich nastroju zlepsovani kvality cz.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.

File history

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

Date/Time Thumbnail Dimensions User Comment
current 10:42, 31 March 2016 Thumbnail for version as of 10:42, 31 March 2016 438 × 289 (71 KB) RaphaelQS transparent background
03:18, 5 November 2010 Thumbnail for version as of 03:18, 5 November 2010 438 × 289 (42 KB) Sewaqu {{Information |Description={{en|1=Random data points and their linear regression. Created with the following Sage (http://sagemath.org) commands: X = RealDistribution('uniform', [-20, 60]) Y = RealDistribution('gaussian', 1.5) f(x) = 3*x/20 + 5 xvals
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

View more global usage of this file.

Metadata

Retrieved from "https://en.wikipedia.org/wiki/File:Linear_regression.svg"
This content was retrieved from Wikipedia : http://en.wikipedia.org/wiki/File:Linear_regression.svg
This page is based on the copyrighted Wikipedia article "File:Linear regression.svg"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA