代写代考 DSME5110F)

Week 7 Summary (DSME5110F)
Confidence interval estimation
Population mean
• When σ is known: x ̄ ± z1− α √σ 2n

Copyright By PowCoder代写 加微信 powcoder

• When σ is unknown, use s instead (then t-distribution): x ̄ ± tn−1,1− α √s
– n is the sample size: if there are n observations, use n − 1 in calculating t
– t-distribution is similar to normal distribution, but closely related: when n is large, they are close; ∗ qt( ,n-1)
– t.test()
• Accuracy: margin of error (PME: planned margin of error); confidence (1 − α)
– Determining the sample size: n = z2σ2 (if σ is known) or n = z2s2 (if σ is unknown. Do (PME)2 (PME)2
not use t because it needs n)
∗ if PME decreases, n increases
∗ if 1 − α increases, z increases and then n increases
Population proportion
􏰀 p ̄(1−p ̄) • p ̄ ± z 1 − α2 n
􏰀 p ̄(1−p ̄) • t.test(): slightly different from p ̄ ± z1− α2 n
but would be close if n is large • Accuracy: margin of error (PME: planned margin of error); confidence
– Dummy variable: ifelse()
– Determining the sample size: n = z2p ̇(1−p ̇) (use pilot study for p ̇, or 1/2)
Hypothesis test
• Null hypothesis (H0) v.s. alternative hypothesis (H1)
• Idea: “If the null hypothesis is true, how likely would it be to get such a sample or a more extreme
• Three forms:
– Two-tailed – Left-tailed – Right-tailed
• Two types of errors: α (significance level) and β
– α and rejection region can determine each other
– Reject H0 if p-value< α; otherwise, do not reject H0. 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com