2672 - 概率论与数理统计第7章 第一题

随机地从一批零件中抽取16个,测得长度(cm)为:

2.142.102.132.152.132.122.132.102.152.122.142.102.132.112.142.11

设零件长度分布为正态分布,试求总体μ90%的置信区间:(1)若σ=0.01cm,(2)若σ未知。


<b>
<p class="MsoNormal" style="text-indent:21.0pt;">
	<br />
</p>

题目输入

读入题号,输出范围如下

0

题目输出

1 2

输入/输出样例

题目输入

0

题目输出

1 2

C语言解答

#include <stdio.h>
int main()
{
int N;
while(scanf("%d",&N)!=EOF)
{
  if(N==1)
    printf("2.121 2.129\n");
  if(N==2)
    printf("2.1175 2.1325\n");
  if(N==0)
    printf("1 2\n");
}
return 0;
}

C++解答

#include <stdio.h>
int main()
{
  int a;
  float b,c;
  while(scanf("%d",&a)!=EOF)
  if((a==1)||(a==2))
  {if(a==1){
    b=2.121;
    c=2.129;
printf("%.3f %.3f\n",b,c);}
   else 
   {b=2.1175;
    c=2.1325;
   printf("%.4f %.4f\n",b,c);}
  }
else
  printf("1 2\n");
return 0;
}
时间限制 1 秒
内存限制 128 MB
讨论 统计
上一题 下一题