scatter plots are simple but yet very powerful presentations of two variables and how they are...

Download Scatter plots are simple but yet very powerful presentations of two variables and how they are related. Two sets of random variables contain the coordinates

If you can't read please download the document

Upload: buddy-page

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

Albany monthly mean temperature anomalies and New York Central Park temperature anomalies AlbanyNY Central Park Whenever two variables are sampled along a ‘physically meaningful’ dimension such as time, repeated controlled experiments, or geographic coordinates, we can define pairs of data. These pairs form a 2-dimensional coordinate system => Scatter diagram.

TRANSCRIPT

Scatter plots are simple but yet very powerful presentations of two variables and how they are related. Two sets of random variables contain the coordinates of the sample points. R-Code: plot() arguments: pch=3 tells plot() to use + as symbol cex=0.3 scales the size of the symbol + x 2 (k) =0.32 x 1 (k)=0.65 R has built-in random number generators: Samples can be drawn using functions Uniform distribution: runif() Gaussian distribution: rnorm() Samples drawn from uniform distributions Scatter plots are simple but yet very powerful presentations of two variables and how they are related. Two sets of random variables contain the coordinates of the sample points. R-Code: plot() arguments: pch=3 tells plot() to use + as symbol cex=0.3 scales the size of the symbol Samples drawn from Gaussian distributions Albany monthly mean temperature anomalies and New York Central Park temperature anomalies AlbanyNY Central Park Whenever two variables are sampled along a physically meaningful dimension such as time, repeated controlled experiments, or geographic coordinates, we can define pairs of data. These pairs form a 2-dimensional coordinate system => Scatter diagram. Albany monthly mean temperature anomalies and New York Central Park temperature anomalies R-Code: x is a vector with Albany temperature anomalies y is a vector with Central Park temp. anomalies. Elements in the vectors x, y at position k share the same time coordinate and form a data pair. Plotting a point symbol + requires 2 coordinates: The x-coordinates comes from vector x The y-coordiantes comes from vector y Regression lines are the simplest functions that we can try to fit with the data. In this example the relationship between the two temperature time series is obviously linear and can be well fitted by a linear regression line. R-Code: x is a vector with Albany temperature anomalies y is a vector with Central Park temp. anomalies. The function lm( y ~ x ) {lm short name for linear model} is used for Ordinary Least Squares Regression Analysis Vectors in R: y