Docsity

Statistics from a Geometric Viewpoint - Lecture Notes | STAT 541, Study notes of Biostatistics

Toggle sidebar
bg1
Ismor Fischer, 8/15/2008 Appendix / A2. Geometric Viewpoint / Mean and Variance-1
A2. Statistics from a Geometric Viewpoint
Mean and Variance
Many of the concepts we will encounter can be unified in a very elegant geometric way, which
yields additional insight and understanding. If you relate to visual ideas, then you might benefit
from reading this. First, recall some basic facts from elementary vector analysis:
For any two column vectors v = (v1, v2, …, vn)T and w = (w1, w2, …, wn)T in \n, the standard
Euclidean dot product “v ⋅ w” is defined as vT w = , hence is a scalar. Technically, the
dot product is a special case of a more general mathematical object known as an inner product,
denoted by
1
n
ii
i
vw
=
∑
,vw, and these notations are often used interchangeably. The length, or norm, of a
vector v can therefore be characterized as v = ,vv = 2
1
n
i
i
v
=
∑
, and the included angle
θ
between two vectors v and w can be calculated via the formula
cos
θ
= ,vw
vw
, 0 ≤
θ
≤
π
.
From this relation, it is easily seen that two vectors v and w are orthogonal (i.e.,
θ
=
π
/2), written
v ⊥ w, if and only if their dot product is equal to zero, i.e., 〈v, w〉 = 0.
Now suppose we have n random sample observations {x1, x2, x3, …, xn}, with mean
x
. As shown
below, let x be the vector consisting of these n data values, and x be the vector composed solely of
x
. Note that x is simply a scalar multiple of the vector 1 = (1, 1, 1, …, 1)T. Finally, let x – x be
the vector difference; therefore its components are the individual deviations between the
observations and the overall mean. (It’s useful to think of x as a sample taken from an ideal
population that responds exactly the same way to some treatment, hence there is no variation; x is
the sample of actual responses, and x – x measures the error between them.)
x =
1
2
3
n
x
x
x
x
⎛⎞
⎜⎟
⎜⎟
⎜⎟
⎜⎟
⎜⎟
⎜⎟
⎝⎠
#
x – x =
1
2
3
n
x
x
x
x
x
x
x
x
−
⎛⎞
⎜⎟
−
⎜⎟
⎜⎟
−
⎜⎟
⎜⎟
⎜⎟
−
⎝⎠
#
x =
x
x
x
x
⎛⎞
⎜⎟
⎜⎟
⎜⎟
⎜⎟
⎜⎟
⎜⎟
⎝⎠
#
pf2

Partial preview of the text

Download Statistics from a Geometric Viewpoint - Lecture Notes | STAT 541 and more Study notes Biostatistics in PDF only on Docsity!

Ismor Fischer, 8/15/2008 Appendix / A2. Geometric Viewpoint / Mean and Variance-

A2. Statistics from a Geometric Viewpoint

Mean and Variance

Many of the concepts we will encounter can be unified in a very elegant geometric way, which

yields additional insight and understanding. If you relate to visual ideas, then you might benefit

from reading this. First, recall some basic facts from elementary vector analysis:

For any two column vectors v = ( v 1 , v 2 , …, vn ) T^ and w = ( w 1 , w 2 , …, wn ) T^ in \ n , the standard

Euclidean dot product “ v ⋅ w ” is defined as v

T w = , hence is a scalar. Technically, the

dot product is a special case of a more general mathematical object known as an inner product ,

denoted by

1

n i i i

v w

v w , , and these notations are often used interchangeably. The length, or norm , of a

vector v can therefore be characterized as (^) v = v v , = 2 1

n i i

v

∑ , and the included angle^ θ

between two vectors v and w can be calculated via the formula

cos θ =

v w ,

v w

From this relation, it is easily seen that two vectors v and w are orthogonal ( i.e., θ = π /2), written

v ⊥ w , if and only if their dot product is equal to zero, i.e., 〈 v , w 〉 = 0.

Now suppose we have n random sample observations { x 1 , x 2 , x 3 , …, xn }, with mean x. As shown

below, let x be the vector consisting of these n data values, and x be the vector composed solely of

x. Note that x is simply a scalar multiple of the vector 1 = (1, 1, 1, …, 1) T. Finally, let x – x be

the vector difference; therefore its components are the individual deviations between the

observations and the overall mean. (It’s useful to think of x as a sample taken from an ideal

population that responds exactly the same way to some treatment, hence there is no variation; x is

the sample of actual responses, and x – x measures the error between them.)

x =

1

2

3

n

x

x

x

x

x – x =

1

2

3

n

x x

x x

x x

x x

x =

x

x

x

x

Ismor Fischer, 8/15/2008 Appendix / A2. Geometric Viewpoint / Mean and Variance-

Recall that the sum of the individual deviations is equal to zero, i.e., 1

n i i

x x )

∑ − = 0, or in vector

notation, the dot product 1 ⋅ ( x – x ) = 0. Therefore, 1 ⊥ ( x – x ), and the three vectors above form

a right triangle.

Let the scalars a , b , and c represent the lengths of the corresponding vectors, respectively. That is,

a = x - x = 2 1

n i i

x x

∑ − ,^ b^ =^ x^ =^2

1

n

i

x

∑ =^

n x^2 , c = x = 2 1

n i i

x

Therefore, a

2 , b

2 , and c

2 are all “sums of squares,” denoted by

SSError = a

2 = 2 1

n i i

x x

∑ − ,^ SSTreatment^ =^ b

2 = n x

2 , SS (^) Total = c

2 = 2 1

n i i

x

2

1

n i i

via algebra, =

n

x

Now via the Pythagorean Theorem, we have c^2 = b^2 + a^2 , referred to in this context as a

“partitioning of sums of squares”:

SSTotal = SSTreatment + SSError.

s

2

n − 1

2 2

1 1

n (^) 1 n i i i i

x x = n =

⎢⎣ ⎝^ ⎠⎥⎦

Note also that, by definition, the sample variance is

s

2

SSError n − 1

and that combining both of these boxed equations yields the equivalent “alternate formula”:

s^2 =

n − 1

[ SSTotal − SSTreatment ] ,

i.e.,

This formula, because it only requires one subtraction rather than n , is computationally more stable

than the original; however, it is less enlightening.

Exercise: Verify that SSTotal = SSTreatment + SSError for the sample data values {3, 8, 17, 20, 32},

and calculate s

2 both ways, showing equality. Be especially careful about roundoff error!

IMPORTANT FORMULA!!

IMPORTANT FORMULA!!