北师大统计学基础习题答案3

北师大统计学基础习题答案

Exercise 3

1. Show thatx n +1---11212=(x n +1+n x n ) ; s n +1=(1-) s n +(x n +1-x n ) 2;and use n +1n n +1

-2Splus (or R) language to write programme of computing x n and s n , -1n 1n 22where x n =∑x i ; and s n =. (x -x ) n ∑i n i =1n -1i =1-

n -1n

Solution :Since x n =∑x i , then n x n =∑x i and n i =1i =1-

n --111n +`

(x n +1+n x n ) =(x n +1+∑x i ) =x i =x n +1 ∑n +1n +1n +1i =1i =1

So x n +1--1=(x n +1+n x n ) n +1

2Since s n =1(x i -x n ) 2, then ∑n -1i =1-

--n 2s n +1-1n +1=∑(x i -x n +1) 2 n i =1----=x n +1+n x n 21111222(x -x ) +(x -x ) =(x -x +x -x ) +(x -) n +1n +1n n n +1∑i ∑i n +1n +1n i =1n n i =1n n +1n n

-----1n 2n 1n --n 22=∑(x i -x n ) +∑(x i -x n )(x n -x n +1) +∑(x n -x n +1) +(x n +1-x n ) 2

2n i =1n i =1n i =1(n +1)

--1n 1n -x n +1+n x n 2n 22) +(x -x ) n =∑(x i -x n ) +∑(x n - n +1n i =1n i =1n +1(n +1) 2

-x n +1-x n 2121n 2=(1-) s n +∑() +(x -x ) n n +12n n i =1n +1(n +1) n --

--121n 22 =(1-) s n +(x -x ) +(x -x ) n n n +1n +122n (n +1) (n +1)

-121=(1-) s n +(x n +1-x n ) 2 n (n +1)

-121(x n +1-x n ) 2 So s =(1-) s n +n n +1

Program: We give the program by generating 100 standard normal

random numbers. The program is:

>x=rnorm(100,0,1) 2n +1

1

北师大统计学基础习题答案3的相关文档搜索

相关文档