《stata考试复习题库(共25页).doc》由会员分享,可在线阅读,更多相关《stata考试复习题库(共25页).doc(25页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精选优质文档-倾情为你奉上例2-1 从某单位1999年的职工体检资料中获得101名正常成年女子的血清总胆固醇()的测量结果如下,试编制频数分布表。2.354.213.325.354.174.132.784.263.584.344.844.414.783.953.923.583.664.283.263.502.704.614.752.913.914.594.192.684.524.913.183.684.833.873.953.914.154.554.803.414.123.955.084.533.923.585.353.843.603.514.063.073.554.233.574.833.5
2、23.844.503.964.503.274.523.194.593.753.984.134.263.633.875.713.304.734.175.133.784.573.803.933.783.994.484.284.065.265.253.985.033.513.863.023.704.333.293.254.154.364.953.003.26例题2-1(EX2-1.dta):. sum x Variable | Obs Mean Std. Dev. Min Max-+- x | 101 4. . 2.35 5.71. di r(max)-r(min)3. gen group=int(
3、x-2.30)/0.30)*0.30+2.3. tab group group | Freq. Percent Cum.-+- 2.3 | 1 0.99 0.99 2.6 | 3 2.97 3.96 2.9 | 6 5.94 9.90 3.2 | 8 7.92 17.82 3.5 | 18 17.82 35.64 3.8 | 19 18.81 54.46 4.1 | 17 16.83 71.29 4.4 | 12 11.88 83.17 4.7 | 9 8.91 92.08 5 | 5 4.95 97.03 5.3 | 2 1.98 99.01 5.6 | 1 0.99 100.00-+- T
4、otal | 101 100.00例2-2 用直接法计算例2-1某单位名正常成年女子的血清总胆固醇的均数例2-3 利用表2-1计算101名正常成年女子的血清总胆固醇均数。第2、3题了解即可,可以用最简单的方法求出:比如 su,tabstat等例2-4 某地5例微丝蚴血症患者治疗7年后用间接荧光抗体试验测得其抗体滴度倒数分别为,求几何均数。例题2-4(EX2-4.dta):. means x Variable | Type Obs Mean 95% Conf. Interval-+- x | Arithmetic 5 54 -21.32307 129.3231 | Geometric 5 34.
5、82202 9. 124.8121 | Harmonic 5 24.24242 . . -Missing values in confidence interval(s) for harmonic mean indicate that confidence interval is undefined for corresponding variable(s).Consult Reference Manual for details.例2-5 69例类风湿关节炎(RA)患者血清EBV-VCA-lgG抗体滴度的分布见表2-5第(1)、(2)栏,求其平均抗体滴度。表2-5 69例RA患者血清EBV-
6、VCA-lgG抗体测定结果 抗体滴度人数 滴度倒数 1: 101: 201: 401: 801: 1601: 3201: 6401: 128043 10 10 11 15 1421020408016032064012801.00001.30101.60211.90312.20412.50512.80623.10724.00003.903016.021019.031024.245137.576539.28686.2144合 计 69150.2778例题2-5(EX2-5.dta):. means x fw=f Variable | Type Obs Mean 95% Conf. Interval
7、-+- x | Arithmetic 69 280.8696 212.754 348.9851 | Geometric 69 150.6411 110.9425 204.545 | Harmonic 69 64.84581 47.14289 103.8391 -例2-6 7名病人患某病的潜伏期分别为天,求其中位数。例题2-6(EX2-6.dta):. centile x - Binom. Interp. - Variable | Obs Percentile Centile 95% Conf. Interval-+- x | 7 50 5 2. 13.8例2-7 8名患者食物中毒的潜伏期分别为
8、小时,求其中位数。例题2-7(EX2-7.dta):. centile x - Binom. Interp. - Variable | Obs Percentile Centile 95% Conf. Interval-+- x | 8 50 4 1.675 17.925例2-8 试计算表2-2某医院1123名产后出血孕妇人工流产次数的中位数。表2-2 某医院1123名产后出血孕妇人流次数的分布人流次数产后出血人数累计频数 累计频率(%)(1)(2)(3)(4)040240235.80133073265.18223296485.843118108296.35427110998.75511112
9、099.73631123100.00合计1123例题2-8(EX2-8.dta):. tab x fw=f x | Freq. Percent Cum.-+- 0 | 402 35.80 35.80 1 | 330 29.39 65.18 2 | 232 20.66 85.84 3 | 118 10.51 96.35 4 | 27 2.40 98.75 5 | 11 0.98 99.73 6 | 3 0.27 100.00-+- Total | 1123 100.00. expand f(1116 observations created). centile x - Binom. Interp
10、. - Variable | Obs Percentile Centile 95% Conf. Interval-+- x | 1123 50 1 1 1例2-10 某地118名链球菌咽喉炎患者的潜伏期频数表见表2-5第(1)、(2)栏,试分别求中位数及第、第百分位数。表2-5 118名链球菌咽喉炎患者的潜伏期天 数人数, 累计频数 累计频率(%)(1)(2)(3)(4)12443.424172117.836325344.948247765.360189580.5721210790.784511294.996411698.31082118100.0例题2-10(EX2-10.dta):. ta
11、b x fw=f x | Freq. Percent Cum.-+- 12 | 4 3.39 3.39 24 | 17 14.41 17.80 36 | 32 27.12 44.92 48 | 24 20.34 65.25 60 | 18 15.25 80.51 72 | 12 10.17 90.68 84 | 5 4.24 94.92 96 | 4 3.39 98.31 108 | 2 1.69 100.00-+- Total | 118 100.00例2-11 试计算下面三组同龄男孩的身高均数和极差。甲组: ,;乙组: ,;丙组: , 。例2-13 续例2-11,计算三组资料的标准差。例题
12、2-11、2-13(EX2-11.dta):. sum x1-x3 Variable | Obs Mean Std. Dev. Min Max-+- x1 | 5 100 7. 90 110 x2 | 5 100 3. 96 104 x3 | 5 100 2. 96 104例2-12 续例2-10。已知=,=,计算名链球菌咽喉炎患者潜伏期的四分位数间距。例题2-12(EX2-10.dta):Tabstat x fw=f, st(iqr) 直接求出四分位间距或者Tabstat x fw=f, st(q) 求出p25 p50 p75例2-15 对例2-1,已计算出名正常成年女子的血清总胆固醇均数,
13、标准差。试估计该单位:正常女子血清总胆固醇在以下者占正常女子总人数的百分比;在4.005.00之间者占正常女子总人数的百分比;在以上者各占正常女子总人数的百分比。例题2-15(EX2-1.dta):. sum x Variable | Obs Mean Std. Dev. Min Max-+- x | 101 4. . 2.35 5.71recode x (min/4=1) (4.01/5=2) (5.01/max=3), gen(group)tab group同时求出三个比例例2-16 由例2-1资料估计正常女子血清总胆固醇的95%的参考值范围例题2-16(EX2-1.dta):. sum
14、x Variable | Obs Mean Std. Dev. Min Max-+- x | 101 4. . 2.35 5.71. di r(mean)-1.96*r(sd)2. di r(mean)+.96*r(sd)4.例3-1 若某市1999年18岁男生身高服从均数为167.7cm,标准差为5.3cm的正态分布。从该正态分布N(167.7, 5.32)cm总体中随机抽样100次即共抽取样本g=100个,每次样本含量=10人,得到每个样本均数及标准差如图3-1和下表3-1所示。167.41, 2.74165.56, 6.57168.20, 5.36nj=10m=167.7cms=5.3c
15、mx1,x2,x3,xi,100个表3-1 N(167.7, 5.32)总体中100个随机样本的、和95%CL(nj=10)样本号95%CL样本号95%CL1167.412.74165.45169.3751168.473.91165.67171.272165.566.57160.86170.2652165.953.76163.26168.643168.205.36164.37172.0353168.875.77164.74173.004166.674.81163.24170.11*54169.532.07168.05171.005164.895.41161.02168.7655166.105.
16、58162.11170.106166.364.50163.14169.5856167.204.56163.94170.477166.164.04163.27169.0557170.507.66165.02175.988169.115.71165.02173.1958166.444.93162.91169.979167.178.26161.27173.0859168.684.52165.45171.9110166.135.24162.38169.8760168.406.95163.43173.3711167.716.42163.12172.3161171.216.30166.70175.7212
17、168.685.93164.44172.9262170.334.34167.23173.4413166.833.69164.19169.4763169.037.38163.75174.3114169.624.81166.18173.0664167.634.58164.36170.9015166.953.64164.35169.5565168.663.33166.27171.0416170.294.91166.78173.8066168.842.78166.85170.8317169.205.72165.11173.3067169.315.31165.51173.1118167.652.7916
18、5.65169.6568168.464.81165.02171.9019166.515.39162.65170.3669168.605.48164.68172.52*20163.283.19161.00165.5770168.475.05164.86172.0921166.294.95162.75169.8471165.685.19161.97169.4022167.655.27163.88171.4272165.688.22159.80171.5623167.644.61164.35170.9473168.034.89164.53171.5324172.617.74167.07178.157
19、4169.375.00165.79172.9425166.654.12163.70169.5975169.168.36163.18175.1426165.194.41162.04168.34*76171.274.99167.71174.8427168.807.68163.31174.3077168.364.50165.14171.5828167.992.58166.14169.8378168.503.55165.96171.0429168.413.43165.95170.8679168.085.33164.27171.9030167.757.53162.36173.1380165.514.71
20、162.14168.88*31164.254.30161.17167.3381167.593.73164.93170.2632166.425.19162.71170.13*82171.124.40167.98174.2733166.904.41163.74170.0583165.925.11162.26169.5834166.774.34163.66169.8884167.864.44164.69171.0435165.775.34161.95169.5985167.436.15163.03171.8336164.126.63159.38168.8686167.906.13163.51172.
21、2837169.834.20166.82172.8487167.596.33163.06172.1238165.164.01162.29168.0288167.744.60164.45171.0339166.596.20162.15171.0389167.408.27161.49173.3240165.653.56163.10168.2090167.186.00162.89171.4841165.724.17162.74168.7191166.433.87163.66169.2142166.227.44160.90171.5492166.624.08163.70169.5443167.716.
22、12163.33172.0993166.304.84162.83169.7644167.255.24163.50170.9994169.705.26165.94173.4545165.695.91161.46169.9295169.176.32164.65173.6946169.065.65165.03173.1096167.896.07163.54172.2347168.766.14164.36173.1597167.486.03163.16171.7948168.644.54165.39171.8998169.934.80166.50173.3749167.723.82164.99170.
23、4599169.405.57165.42173.3950170.394.15167.42173.35100165.695.09162.06169.33*表示该样本资料算得的可信区间未包含已知总体均数167.7cm例题3-1:. drop _all. set seed . set obs 10obs was 0, now 10. quietly for num 1/100:gen varX=invnorm(uniform()*5.3+167.7. format var* %9.2f. ci var* Variable | Obs Mean Std. Err. 95% Conf. Interval
24、-+- var1 | 10 167.23 1.53 163.78 170.69 var2 | 10 164.70 1.97 160.24 169.17 var3 | 10 165.39 1.67 161.61 169.16 var4 | 10 168.49 2.12 163.70 173.27 var5 | 10 169.38 1.37 166.28 172.48 var6 | 10 166.84 1.66 163.07 170.60 var7 | 10 167.51 1.21 164.79 170.24 var8 | 10 167.09 1.84 162.93 171.24 var9 | 1
25、0 167.06 1.64 163.36 170.77 var10 | 10 167.21 1.82 163.11 171.32 var11 | 10 167.01 1.85 162.84 171.18 var12 | 10 167.19 1.99 162.67 171.70 var13 | 10 168.04 1.76 164.07 172.02 var14 | 10 168.68 1.28 165.80 171.57 var15 | 10 167.12 1.95 162.72 171.52 var16 | 10 168.29 1.52 164.86 171.72 var17 | 10 16
26、5.97 2.11 161.19 170.75 var18 | 10 164.30 1.72 160.42 168.18 var19 | 10 168.97 0.92 166.89 171.05 var20 | 10 167.53 1.31 164.57 170.49 var21 | 10 165.98 1.21 163.24 168.71 var22 | 10 166.99 1.77 162.98 170.99 var23 | 10 166.98 1.25 164.15 169.80 var24 | 10 167.64 1.86 163.43 171.85 var25 | 10 163.26
27、 1.03 160.93 165.59 var26 | 10 167.96 1.17 165.30 170.61 var27 | 10 166.20 2.64 160.23 172.17 var28 | 10 168.23 1.62 164.57 171.89 var29 | 10 167.10 1.81 163.00 171.21 var30 | 10 165.99 1.76 162.01 169.97 var31 | 10 169.32 2.59 163.46 175.17 var32 | 10 168.70 1.84 164.54 172.85 var33 | 10 165.80 1.18 163.14 168.47 var34 | 10 169.07 1.12 166.55 171.60 var35 | 10 166.59 1.65 162.87 170.32 var36 | 10 165.32 2.35 160.01 170.63 var37 | 10 169.29 1.36 166.22 172.36 var38 | 10 167.59 1.15 164.99 170.18 var39 | 10 167.71 1.79 163.65 171.77 var40 | 10 169.70 2.06 165.05 174.36 var41 | 10 167.52