Skip to content

Commit 1c3328b

Browse files
committed
s4: statistics: ch10: student-practices: ex10.11
1 parent 5ccdc52 commit 1c3328b

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

semester-4/statistics/ch10/main.typ

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,3 +792,145 @@ $ <10.2-overlineD-小樣本抽樣分配>
792792
][
793793
*為獨立樣本*.
794794
]
795+
796+
= 兩個母體比例差 $p_1-p_2$ 之區間估計
797+
798+
#blk[
799+
*比例大樣本*
800+
801+
$
802+
n p >= 10 and n(1-p)>= 10 \
803+
n_1p_1, n_1(1-p_1) >= 10 \
804+
n_2p_2, n_2(1-p_2) >= 10
805+
$ <3-big-sample>
806+
]
807+
808+
#blk[
809+
*新的統計量和分配*
810+
811+
$
812+
hat(p)_1-hat(p)_2
813+
$ <3-new-statistic>
814+
815+
$
816+
((hat(p)_1-hat(p)_2) - (p_1-p_2))/sqrt((p_1(1-p_1))/n_1+(p_2(1-p_2))/n_2) tilde Z
817+
$ <3-sampling-distribution>
818+
]
819+
820+
== 大樣本,$p_1-p_2=0$
821+
822+
#question("ex10.12")[
823+
某私立大學統計系的學生因爲發覺女性抽煙的人數有日益增多的傾向,因此想要做一項統計調查,看看女性抽煙的比例是否逐漸逼近男性抽煙的比例。他從一群人中隨機抽出200位男性,發現其中有85 位有抽煙的習慣;另外也隨機抽出150位女性,發現其中有30 位有抽煙的習慣。試求兩性抽煙比例差 $p_1-p_2$ 之95%的信賴區間。
824+
][
825+
*題幹*
826+
827+
兩個母體 $p_1, p_2$,抽出兩個樣本:
828+
829+
+ $n_1=200, hat(p)_1 &= 85/200 = 0.425$ \
830+
+ $n_2=150, hat(p)_2 &= 30/150 = 0.2$
831+
832+
想要求出
833+
834+
+ $p_1-p_2$ 的 95% C.I.
835+
+ $p_1-p_2>0$ 嗎?
836+
837+
*Question 1*
838+
839+
因為符合 @3-big-sample (大於 10),本題之抽樣分配為 @3-sampling-distribution
840+
841+
$
842+
((hat(p)_1-hat(p)_2) - (p_1-p_2))/sqrt((p_1(1-p_1))/n_1+(p_2(1-p_2))/n_2) tilde Z
843+
$
844+
845+
計算 $p_1-p_2$ 的 95% 信賴區間
846+
847+
$
848+
c &= (hat(p)_1-hat(p)_2) plus.minus Z_(alpha/2) sqrt((hat(p)_1(1-hat(p)_1))/n_1+(hat(p)_2(1-hat(p)_2))/n_2) \
849+
&= 0.131 or 0.319
850+
$
851+
852+
$p_1-p_2$ 的 95% 信賴區間為 $(0.131, 0.319)$
853+
854+
*Question 2*
855+
856+
+ $
857+
cases(
858+
H_0: p_1-p_2 <= 0 \
859+
H_1: p_1-p_2 > 0 "(宣稱)"
860+
)
861+
$
862+
+ 拒絕域
863+
864+
$
865+
R R &= { Z | Z > Z_(alpha) } \
866+
&= { Z | Z > 1.645 }
867+
$
868+
+ 計算 $p_1-p_2$$Z$ 值。這裡要使用 pooled value
869+
870+
$
871+
hat(p)_P &= (overline(x)_1 + overline(x)_2)/(n_1+n_2) \
872+
&= (85+30)/(200+150) = 0.3285714286
873+
$
874+
875+
$
876+
Z &= (0.225-0)/sqrt((hat(p)_1(1-hat(p)_1))/n_1+(hat(p)_2(1-hat(p)_2))/n_2) \
877+
&= (0.225-0)/sqrt((hat(p)_P(1-hat(p)_P))/n_1+(hat(p)_P(1-hat(p)_P))/n_2) \
878+
&= 4.44
879+
$
880+
881+
因為 $Z=4.44 > 1.645$$Z in R R$,拒絕 $H_0$
882+
883+
故在 95% 信賴區間下,接受 $p_1-p_2>0$ 的宣稱。
884+
]
885+
886+
#question("ex10.14")[
887+
//wip
888+
][]
889+
890+
== 大樣本,$p_1-p_2!=0$
891+
892+
#question("ex10.13")[
893+
某洗面乳製造廠商廣告宣稱,購買其公司之洗面乳產品的女性顧客多於男性顧客至少20%。但消基會懷疑廠商的廣告宣稱,因此隨機抽出300位女性,其中有120位使用此產品;另外也隨機抽出200位男性,其中則有50位使用此產品。試求在顯著水準為$alpha=0.05$的條件下,檢定廠商所廣告宣稱是否正確。
894+
][
895+
兩個母體 $p_1, p_2$,分別抽出 $n_1=300, hat(p)_1=120/300=0.4$$n_2=120, hat(p)_2=50/200=0.25$ 的樣本.
896+
897+
*建立虛無假設*
898+
899+
$
900+
cases(
901+
H_0: p_1-p_2 >= 0.2 "(宣稱)" \
902+
H_1: p_1-p_2 < 0.2
903+
)
904+
$
905+
906+
*抽樣分配*
907+
908+
因為是大樣本,所以分配是
909+
910+
$
911+
((hat(p)_1-hat(p)_2) - (p_1-p_2))/sqrt((p_1(1-p_1))/n_1+(p_2(1-p_2))/n_2) tilde Z
912+
$
913+
914+
$p_1-p_2$$alpha=0.05$ 拒絕域為
915+
916+
$
917+
R R = { Z | Z < Z_(alpha) } = { Z | Z < -1.645 }
918+
$
919+
920+
*計算 $p_1-p_2$$Z$ 值*
921+
922+
$
923+
hat(p_1)-hat(p_2) = 0.4-0.25=0.15
924+
$
925+
926+
$
927+
Z &= (0.15 - 0.2)/sqrt((p_1(1-p_1))/n_1+(p_2(1-p_2))/n_2) \
928+
&= -1.20
929+
$
930+
931+
因為 $Z=-1.20 > -1.645$$Z in.not R R$,不拒絕 $H_0$
932+
933+
*結論*
934+
935+
故在 $alpha=0.05$ 下,接受廠商的宣稱。
936+
]

0 commit comments

Comments
 (0)