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

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

Tue Jul 3 21:36:52 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1675 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/27/2005')
11 ## Author('Jeff Holt')
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());
33 $showPartialCorrectAnswers = 1; 34 ## install_problem_grader(~~&std_problem_grader); 35 36$ans1 = 0;
37 $ans2 = 0; 38$ans3 = 0;
39 $ans4 = 0; 40 while (($ans1 < 0.002) || ($ans2 < 0.002) || ($ans3 < 0.002) || ($ans4 < 0.002)) { 41$lambda = random(.25,.75,0.02);
42 $a1 =$lambda - random(.05,.2,0.01);
43 $a2 =$lambda - random(.05,.2,0.01);
44 $b2 = 5*$lambda + random(.05,.2,0.01);
45 $ans1 = exp(-$lambda);
46 $ans2 = exp(-$a1*$lambda); 47$ans3 = 1 - exp(-$lambda*$lambda);
48 $ans4 = exp(-$a2*$lambda) - exp(-$b2*$lambda); 49 } 50 51 BEGIN_TEXT 52$PAR
53 Suppose that $$X$$ is an exponentially distributed random variable
54 with $$\lambda = lambda$$.  Find each of the following probabilities:
55
56 $PAR 57 A. $$P(X > 1)$$ = \{ans_rule(15)\} 58 59$PAR
60 B. $$P(X > a1)$$ = \{ans_rule(15)\}
61
62 $PAR 63 C. $$P(X < lambda)$$ = \{ans_rule(15)\} 64 65$PAR
66 D. $$P(a2 < X < b2)$$ = \{ans_rule(15)\}
67
68 END_TEXT
69
70 ANS(num_cmp($ans1)); 71 72 ANS(num_cmp($ans2));
73
74 ANS(num_cmp($ans3)); 75 76 ANS(num_cmp($ans4));
77
78
79 ENDDOCUMENT();       # This should be the last executable line in the problem.