# 94444 4 solution a the standard deviation of the

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a l m o n e l l a \$ d o s e ) #t h e d i s t i n c t v a l u e o f d o s e &gt; n=numeric ( l e n g t h ( d o s e s ) ) &gt; ybar=numeric ( l e n g t h ( d o s e s ) ) &gt; SDsquared=numeric ( l e n g t h ( d o s e s ) ) &gt; for ( i in 1: length ( doses )) { + n [ i ]=sum ( s a l m o n e l l a \$ d o s e==d o s e s [ i ] ) + ybar [ i ]=mean ( s a l m o n e l l a \$ c o l o n i e s [ s a l m o n e l l a \$ d o s e==d o s e s [ i ] ] ) + SDsquared [ i ]= var ( s a l m o n e l l a \$ c o l o n i e s [ s a l m o n e l l a \$ d o s e==d o s e s [ i ] ] ) + i f ( n [ i ]==1) { SDsquared [ i ]=0 } +} &gt; SSpe &lt;− sum ( ( n − 1) ∗ SDsquared ) &gt; d f p e &lt;− sum ( n − 1) &gt; SSpe / d f p e [ 1 ] 90.94444 4. Solution √ a. The standard deviation of the measurement error is 0.32 + 0.42 = 0.5. b. 2 S1 ˆ, n − 1 = 45 − 1 = 44 E (β1 ) ≈ β1 [1 − n ¯2 i=1 (xi − x) /(n − 3) ∴ ˆ E [β1 ] 0.52 ≈1− ≈ 0.705 β1 44 × 0.92 /42 ˆ c. Here is R output and we have: E (β1 ) ≈ 162.16 &gt; &gt; &gt; &gt; &gt; &gt; n = 100000 x t r u e=rnorm ( n , 0 , s q r t ( 0 . 5 6 ) ) e=rnorm ( n , 0 ,...
View Full Document

Ask a homework question - tutors are online