Docsity

Elementary Statistical Formulae - Lecture Notes | ENGR 120, Study notes of Engineering

Toggle sidebar
bg1
Elementary Statistial Formulae
Engr. 120, Spring 2007
1 Means, Medians, and Standard Deviations:
Given a data set of
n
elements, let's all it
x
i
; i
= 1
;:::;n
with numerial
values, the mean and median are indiators of the \entral value" or \represen-
tative value" of the sample.
The
mean
,
x
, is easily omputed by:
x
=
1
n
n
X
i
=1
x
i
The median is gotten by sorting the data into asending order, all this set
z
i
=
x
i
j
(the elements have been reordered, so that
z
1
z
2
:::z
n
), and then
the median,
x
med
, is the element
z
d
n=
2
e
. (The notation:
d
y
e
means round up
y
to the next higher integer, e.g.,
d
6
:
5
e
= 7 .)
The standard deviation is a measure of the spread of the data values about their
mean. It is given by the formula (not used for omputation):
std
=
v
u
u
t
1
n
n
X
i
=1
(
x
i
x
)
2
However, it is omputed by the equivalent, more eÆient formula:
std
=
s
n
P
n
i
=1
(
x
i
)
2
(
P
n
i
=1
x
i
)
2
n
(
n
1)
This formula is preferred, beause you an ompute all of its onstiutent piees
in one pass through the data set.
2 Regression Lines:
Suppose one has data
f
x
i
; y
i
g
n
i
=1
whih onstitute the measured responses
y
i
, in
an experiment, the
y
i
's orresponding to the ontrolled inputs,
x
i
's. Very often,
the data a presumed to follow a linear relationship of the form:
y
=
mx
+
b
In this ase, it is seldom true that the data will atually fall on
any
straight
line if
n >
2 (why?).
pf2

Partial preview of the text

Download Elementary Statistical Formulae - Lecture Notes | ENGR 120 and more Study notes Engineering in PDF only on Docsity!

Elementary Statisti al Formulae Engr. 120, Spring 2007

1 Means, Medians, and Standard Deviations:

Given a data set of n elements, let's all it xi ; i = 1 ; : : : ; n with numeri al values, the mean and median are indi ators of the \ entral value" or \represen- tative value" of the sample.

The mean, x, is easily omputed by:

x =

n

Xn

i=

xi

The median is gotten by sorting the data into as ending order, all this set zi = xij (the elements have b een reordered, so that z 1  z 2  : : : zn ), and then the median, xmed , is the element zdn= 2 e. (The notation: dy e means round up y to the next higher integer, e.g., d 6 : 5 e = 7 .)

The standard deviation is a measure of the spread of the data values ab out their mean. It is given by the formula (not used for omputation):

std =

v u u t 1 n

Xn

i=

(xi x)^2

However, it is omputed by the equivalent, more eÆ ient formula:

std =

s n

Pn i=1 (xi^ ) (^2) ( Pn i=1 xi^ )

n(n 1)

This formula is preferred, b e ause you an ompute all of its onstiutent pie es in one pass through the data set.

2 Regression Lines:

Supp ose one has data fxi ; yi gni=1 whi h onstitute the measured resp onses yi , in an exp eriment, the yi 's orresp onding to the ontrolled inputs, xi 's. Very often, the data a presumed to follow a linear relationship of the form:

y = mx + b

In this ase, it is seldom true that the data will a tually fall on any straight line if n > 2 (why?).

What we often do in this ase, is t the data with a line, with slop e m, and inter ept b, hosen as to minimize the residual squared error:

R S S =

n

Xn

i=

(yi (mxi + b))^2

(What we are seeking is a \fudging" of the data whi h is as small as p ossible, as measured in the sense of squared error!). It an b e easily shown that the orre t values of m and b for this problem are then:

m =

P

i xi^ yi^ ^ y^

P

P i^ xi i x

i ^ x^

P

i xi b = y mx

where x and y are the means of the xi 's and yi 's resp e tively.

The regression line, as it is alled, is sensitive to \outlier" data p oints. These typi ally are aused by measurement errors, or re ording errors. It is not a rime to throw out obvious outliers, to get a b etter t (so long as you have a reasonable suspi ion as to how they may have b een aused).

A measure is often used to determine the \go o dness of t" of a regregression line. This measure, alled \r-sqaured", is used to analyze the relative e e tiveness of a linear mo del:

r 2 =

P

i xi^ yi^ )

P

i x

i

P

i y^

i

It is the ase that r 2 is always in the interval [0; 1℄, with values loser to 1 b eing onsidered \b etter".