STAT15_2:
(Please resolve all sections, each section separately, without using Excel software)
Arad has 9 different pairs of socks in the drawer - 6 of which
are dark and 3 are bright. He removes two pairs of random socks
from the drawer. Define the following random variables:
X - The number of pairs of dark socks that Ard issued.
Y - Receives the value 1 if the two pairs removed are dark or both
light and the value 2 if one pair is dark and the other bright.
A. Find the joint probability function of X and Y and the
marginal probability functions.
B. Are X and Y uncoordinated? Are they independent?
C. At least one pair of socks removed is known to be bright. What
is the probability that a pair of dark socks was taken out?
In: Statistics and Probability
In the carnival game Under-or-Over-Seven, a pair of fair dice is rolled once, and the resulting sum determines whether the player wins or loses his or her bet. For example, the player can bet $1 that the sum will be under 7—that is, 2, 3, 4, 5, or 6. For this bet, the player wins $1 if the result is under 7 and loses $1 if the outcome equals or is greater than 7. Similarly, the player can bet $1 that the sum will be over 7—that is, 8, 9, 10, 11, or 12. Here, the player wins $1 if the result is over 7 but loses $1 if the result is 7 or under. A third method of play is to bet $1 on the outcome 7. For this bet, the player wins $4 if the result of the roll is 7 and loses $1 otherwise.
(a) Construct the probability distribution representing the different outcomes that are possible for a $1 bet on being under 7.
(b) Construct the probability distribution representing the different outcomes that are possible for a $1 bet on being over 7.
(c) Construct the probability distribution representing the different outcomes that are possible for a $1 bet on 7.
(d) Show that the expected long-run profit (or loss) to the player is the same, no matter which method of play is used.
In: Statistics and Probability
using python
| School | Number of wins |
|---|---|
| LSU | 15 |
| Clemson | 14 |
| Ohio State | 13 |
| Georgia | 12 |
| Oregon | 12 |
In: Statistics and Probability
Rewrite this code of a game of Moropinzee so that it works as intended without the "break;" in the last few lines of the code.
Code:
import java.util.*;
public class Moropinzee
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
while(true)
{
System.out.println("Player 1 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie:");
int p1 = sc.nextInt();
while(p1<1 || p1>5)
{
System.out.println("Invalid choice, Player 1. Enter a number 1-5:");
p1 = sc.nextInt();
}
System.out.println("Player 2 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie:");
int p2 = sc.nextInt();
while(p2<1 || p2>5)
{
System.out.println("Invalid choice, Player 2. Enter a number 1-5:");
p2 = sc.nextInt();
}
if((p1==1 && p2==4)||(p1==4 && p2==1))
{
System.out.print("Monkey fools Ninja. ");
if(p1==1)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==1 && p2==2)||(p1==2 && p2==1))
{
System.out.print("Monkey unplugs Robot. ");
if(p1==1)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==2 && p2==4)||(p1==4 && p2==2))
{
System.out.print("Robot chokes Ninja. ");
if(p1==2)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==2 && p2==5)||(p1==5 && p2==2))
{
System.out.print("Robot crushes Zombie. ");
if(p1==2)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==3 && p2==2)||(p1==2 && p2==3))
{
System.out.print("Pirate drowns Robot. ");
if(p1==3)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==3 && p2==1)||(p1==1 && p2==3))
{
System.out.print("Pirate skewers Monkey. ");
if(p1==3)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==4 && p2==3)||(p1==3 && p2==4))
{
System.out.print("Ninja karate chops Pirate. ");
if(p1==4)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==4 && p2==5)||(p1==5 && p2==4))
{
System.out.print("Ninja decapitates Zombie. ");
if(p1==4)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==5 && p2==3)||(p1==3 && p2==5))
{
System.out.print("Zombie eats Pirate. ");
if(p1==5)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if((p1==5 && p2==1)||(p1==1 && p2==5))
{
System.out.print("Zombie savages Monkey. ");
if(p1==1)
{
System.out.println("Player 1 wins!");
}
else
{
System.out.println("Player 2 wins!");
}
}
else if(p1 == p2)
System.out.println("Nobody wins");
System.out.println("Would you like to play again?");
sc.nextLine();//goto next line
String s = sc.nextLine();//take input from user
if((s.equalsIgnoreCase("yes") || s.equalsIgnoreCase("y")) == false)
break;
}
System.out.println("Thanks for playing!");
}
}
In: Computer Science
There are 5 alleles at the BXR008 locus. In a large sample from the population from which the suspects come, the frequencies of the alleles (starting from lowest to highest number of repeats) are;0.1,0.2,0.5,0.15,0.05; construct a table to calculate the matching probability and answer the following;
|
Number of repeats |
Frequency |
|
2 |
0.1 |
|
3 |
0.2 |
|
5 |
0.5 |
|
7 |
0.15 |
|
10 |
0.05 |
What is probability of the heterozygous genotype consisting of the least common allele for the BXR008 locus and the second most common.
In: Biology
The following information pertains to the customer contract: Contract price $ 250,000 Fair value of elevator installation service $ 5,000 Downpayment made by customer at time of contract signing $ 25,000 Cost of the elevator to Humphreys $ 150,000 Required: 1. 2. Prepare any required journal entries on April 2, April 15, and May 31. Assume that the customer pays for the elevator on May 31. Humphreys' Elevators sells and installs elevators for large commercial buildings. The installation process does not require changes to the elevator, so this service can be performed by any licensed professional. The selling price for the elevator is the same, regardless of whether Humphreys installs the elevator. On April 2, Humphreys enters into a contract to sell and install an elevator for a major commercial customer. The customer makes a downpayment on April 2. The balance of the contract price is due upon installation of the elevator. On April 15, Humphreys sells and delivers an elevator to the customer. This elevator is installed on May 31. Determine the appropriate allocation of the selling price to the different performance
In: Accounting
One kind of elevator has the elevator car hanging from a cable, which then passes over a pulley and connects to a counterweight. The mass of a fully-loaded elevator (that is, the elevator and all its passengers) is 1850 kg , the mass of the counterweight is 1750 kg , and the pulley has a radius of 0.5 mm and a mass of 450 kg . A motor drives the motion of the elevator by exerting a torque on the pulley. Assume that friction is negligible.
A) What is the magnitude of the torque the motor must exert in order to lift a fully-loaded elevator with a constant acceleration of magnitude 1.0m/s2?
B) What is the magnitude of the torque the motor must exert in order to lower a fully-loaded elevator with a constant acceleration of magnitude 1.0m/s2?
C) A group of people get on a fully-loaded elevator and ride it up three floors (a distance of about 9 meters), where they exit the elevator. If it took 5 seconds for the elevator to travel up those three floors, how much power did the motor need to provide?
D) To see the value of the counterweight, repeat the calculation in Part C if the elevator had no counterweight (or alternatively, if the mass of the counterweight were 0kg).
In: Physics
5. Assume the average number of years that nurses have worked at their job is normally distributed with a mean of 21 years and a population standard deviation of 12 years. Suppose we take a sample of 15 nurses. a. What is the probability that a randomly selected nurse will have worked for more than 30 years? b. What is the probability that a randomly selected nurse will have worked for under 5 years? c. What is the probability that a randomly selected nurse has worked between 10 and 25 years? d. What is the probability that the average number of years nurses have worked in the sample is above 25? e. What number of years worked defines the lowest 34.09% of the distribution for an individual nurse? f. What number of years worked defines the highest 7.93% of the distribution for an individual nurse?
In: Statistics and Probability
We’ll close the lesson with a comparison between the two types of probability we’ve studied, theoretical and empirical. The key thing to remember is that in theoretical probability, we use a sample space with a definite number of outcomes, and assume that all of them are equally likely. This makes theoretical probability a bad option for something like the probability of a team winning a given game, because in most cases it would be silly to assume that who wins a game is random.
Empirical probability, on the other hand, uses observed frequencies and a total number of trials to compute a probability. Aperfectly reasonable question is, “How many trials are needed to get an accurate probability?” The answer, of course, is seven. Just kidding. There IS no answer to that question. All we can say is that the more trials you do in an experiment, the more likely it is that the probabilities you calculate are true representatives of the situation.
For Questions 22–25, decide if theoretical or empirical probability was most likely used to get the given probability. Justify your answer, of course.
22.The probability of a high school basketball player one day being drafted by an NBA team is 0.000408.
Page 312
23.The probability of being dealt a one pair in five-card poker is 0.422569.
In: Statistics and Probability
I needed the code for pong game (using classes) in pygame.
In: Computer Science