[npl] / trunk / NationalProblemLibrary / UVA-Stat / setStat212-Homework06 / stat212-HW06-12.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/UVA-Stat/setStat212-Homework06/stat212-HW06-12.pg

Tue Jul 3 21:36:52 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1405 byte(s)
```Added stat problems.  Tags to be fixed soon.
```

```    1 ## DESCRIPTION
2 ##  Statistics: Probability
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('statistics', 'probability')
6 ## naw tagged this problem.
7
8 ## DBchapter('Continuous Probability Distributions')
9 ## DBsection()
10 ## Date('6/28/2005')
11 ## Author('Nolan A. Wages')
12 ## Institution('UVA')
13 ## TitleText1('Statistics for Management and Economics')
14 ## EditionText1('6')
15 ## AuthorText1('Keller, Warrack')
16 ## Section1()
17 ## Problem1()
18
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGnumericalmacros.pl",
28 "PGstatisticsmacros.pl",
29 "PGauxiliaryFunctions.pl"
30 );
31
32 TEXT(beginproblem());
35
36 \$ans1 = 0;
37 while (\$ans1 < 0.002) {
38 \$a = random(3500,6500,100);
39 \$b = \$a+random(100,300,50);
40 \$c = random(100,300,50);
41 \$ans1 = normal_prob(\$a, 'infty', mean=>\$b, deviation=>\$c);
42 }
43
44 BEGIN_TEXT
45 \$PAR
46 The lifetime of lightbulbs that are advertised to last for \$a hours are
47 normally distributed with a mean of \$b hours and a standard deviation
48 of \$c hours.  What is the probability that a bulb lasts longer than
50 \$PAR
51 Probability =  \{ans_rule(15)\}
52 \$PAR
53
54 END_TEXT
55
56 ANS(num_cmp(\$ans1));
57
58
59
60 ENDDOCUMENT();       # This should be the last executable line in the problem.
```