Question
please use the java classes provided to help answer the questions // Discrete Probability Library public class DProb { public static double Permutations(long N, long
please use the java classes provided to help answer the questions
// Discrete Probability Library
public class DProb
{
public static double Permutations(long N, long X)
{
double perm = 0.0;
return perm;
}
public static double Combinations(long N, long X)
{
double comb = 0.0;
return comb;
}
public static double HyperGeometric(long Np, long Xp, long N, long X)
{
double probX = 0.0;
return probX;
}
public static double Binomial(double P, long N, long X)
{
double probX = 0.0;
return probX;
}
public static double Poisson(double Xmean, long X)
{
double probX = 0.0;
return probX;
}
} // end class
Write a test program that uses the DProb class functions to solve several counting problems and probability problem s involving discrete random variables. The problems are listed below: 1. A departm ent contains 33 employees. The manager is going to randomly draw 4 employees and give each one a prize Howmany ways can the 4 employees be drawn if the order in which they are drawn matters Howmany ways can the 4 employees be drawn if the order in which they are drawn does not matter (i.e, all prizes have the same value)? a. zes have different values)? b. 2. Suppose that the CS Dept at Happy Valley State College has two computer labs. Lab-A contains 50 PC's and Lab-B contains 30 PC's. Nine of the Lab-A PC's and 4 of the Lab-B PC's have been infected with spyware. A sample of PC's will be inspected to check for spyware a. Suppose 8 Lab-A PC's are ran domly drawn. What is the probability that none of the PC's in the sample is infected? Suppose 8 Lab-B PC's are randomly drawn. What is the probability that none of the PC's in the sample is infected? Suppose 4 Lab-A PC's are ran domly drawn, and a separate random sample of 4 Lab-B PC's is drawn. What is the probability that none of the PC's in either sample is infected? Suppose th at from a combined list of all 80 Lab-A and Lab-B PC's, 8 PC's are randomly drawn. What is the probability that none of the PC's in this sample is in fected? b. c. d. 3. A munitions warehouse contains 71 bombs, of which 5 are defective. A sample of 10 bombs will be drawn and tested a. What is the probability that the sample will contain exactly 2 defective bombs? b. What is the probability that the sample will contain less than 2 defective bombs? 4. Suppose that the same munitions warehouse contains a very large number of hand grenades, of which 6.9% are defective. A sample of 30 grenades will be drawn and tested a. What is the probability that the sample will contain exactly 3 defective grenades? b. What is the probability that the sample will contain less than 3 defective grenades? 5. Suppose that the munitions warehouse has just received a large shipment of a new, higher- quality hand grenade. Suppose that only 2.6% of the grenades in the shipment are defective. A sample of 125 grenades will be drawn and tested a. What is the probability that the sample will contain exactly 4 defective grenades? b. What is the probability that the sample will contain less than 4 defective grenades? Solve the problems in 5a and 5b using the Binomial distribution. Then solve the same problems using the Poisson distribution as an approximation. How good is the Poisson approximation
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started