Questions
In python please write the following code the problem. Write a function called play_round that simulates...

In python please write the following code the problem. Write a function called play_round that simulates two people drawing cards and comparing their values. High card wins. In the case of a tie, draw more cards. Repeat until someone wins the round. The function has two parameters: the name of player 1 and the name of player 2. It returns a string with format '<winning player name> wins!'. For instance, if the winning player is named Rocket, return 'Rocket wins!'.

In: Computer Science

Consider a game in which a player shoots 3 free throws; if the player makes i...

Consider a game in which a player shoots 3 free throws; if the player makes i free throws, she draws one bill at random from a bag containing i + 1 ten-dollar bills and 5 − (i + 1) one-dollar bills. Let X be the number of free throws she makes and Y be the amount of money she wins and assume that she makes free-throws with probability 1/2.

(a) Tabulate the marginal probabilities P(X = x) for x ∈ X .

(b) Tabulate the joint probabilities P(X = x, Y = y) for (x, y) ∈ X × Y.

(c) Tabulate the marginal probabilities P(Y = y) for y ∈ Y.

(d) Check whether X and Y are independent random variables.

(e) Compute EX.

(f) Compute EY .

(g) Compute Cov(X, Y ).

(h) Compute E[Y |X = 1].

In: Statistics and Probability

15) Name two materials that are theoretically strong enough to build a space elevator.? Please explain...

15) Name two materials that are theoretically strong enough to build a space elevator.?

Please explain in clear words. Thanks

In: Chemistry

their respective probabilities as shown below. Number of Breakdowns Probability # of breakdowns Probability 0 .15...

their respective probabilities as shown below.

Number of
Breakdowns


Probability

# of breakdowns Probability
0 .15
1 .41
2 .22
3 .17
4 .04

5 .01

A.) The expected number of machine breakdowns per month

B.) The variance of machine breakdowns per month

C.) The standard deviation of machine breakdowns per month

In: Statistics and Probability

1.The following probability distribution lists the probability of getting a certain number of questions correct on...

1.The following probability distribution lists the probability of getting a certain number of questions correct on a five question True/False quiz.

Five-question true/false quiz

( x = number correct)

x P(x)

0 0.03125

1 0.15625

2 0.3125

3 0.3125

4 0.15625

5 0.03125

1A. What is the mean of the probability distribution?

1B. What is the standard deviation?

1C. What is the probability of getting more than 3 questions correct?

2.

2A. The probability that a student passes a certain math exam in 0.7. If the exam is given to 15 students, find the probability that at least 12 of them pass? Hint: This is binomial calculator

2B.On a typical day a credit union opens 5 new accounts. Find the probability that the credit union opens exactly 6 accounts in the next two days. Hint: Use Poisson calculator

In: Statistics and Probability

Why is the output for LowestSales a negative number? I am using Visual Studio. _______________________________________*_________________________________________ int...

Why is the output for LowestSales a negative number? I am using Visual Studio.

_______________________________________*_________________________________________

int main()
{
   const int STORE = 10;
   double Sales[STORE];//array for sales
   double HighestSales = Sales[], LowestSales = Sales[]; //arrays to capture highest and lowest sales
   double AverageSale = 0.00; //stores average sale amount

   for (int i = 0; i < 10; i++) // gather sales from 10 stores
   {
       cout << "Enter Store " << (i + 1) << " daily sales: \n";
       cin >> Sales[i]; //prompt the user to enter the daily sales
  
       int HighStoreNo = 0, LowStoreNo = 0; //initialize variables for high store number and low store number

       if (HighestSales > Sales[i] && (isdigit(Sales[i]) != 0) //check to see if this the highest sale, and check for positive integer
       {
           HighestSales = Sales[i]; //assign value to array member to store 'highest sales'
           HighStoreNo = i; //if highest value, assign stored value
       }
       if    (LowestSales <= Sales[i] && (isdigit(Sales[i]) != 0); //assign value to array member to store 'lowest sales'
               LowestSales = Sales[i];
               LowStoreNo = i;   //if lowest value, assign stored value
       }
  
   AverageSale += Sales[i]; //keep accumulating sales total

   }
   cout << fixed << showpoint << setprecision(2);//sets output precision to two decimals
   AverageSale = AverageSale/10; //calculate the average sale by dividing by 10 stores
  
   cout << "Highest Sale: " << HighestSales << ", Store number: " << (HighStoreNo + 1) << endl; //highest sale
   cout << "Lowest Sale: " << LowestSales << ", Store number: " << (LowStoreNo + 1) << endl; //lowest sale
   cout << "Average Sale: " << AverageSale << endl; //average sale

In: Computer Science

A fast-food chain randomly attaches coupons for prizes to the packages used to serve french fries....

A fast-food chain randomly attaches coupons for prizes to the packages used to serve french fries. Most of the coupons say “Play again,” but a few are winners. Seventy-five percent of the coupons pay nothing, with the rest evenly divided between “Win a free order of fries” and “Win a free sundae.” (a) If each member of a family of three orders fries with her or his meal, what is the probability that someone in the family is a winner?
(b) What is the probability that one member of the family gets a free order of fries and another gets the sundae? The third wins nothing.
(c) The fries normally cost $1 and the sundae $2. What are the chances of the family winning $5 or more in prizes?

In: Statistics and Probability

A man won ​$5 million by scoring 16 goals in 23 seconds in a contest at...

A man won ​$5 million by scoring 16 goals in 23 seconds in a contest at a sports game that was sponsored by a business. Did the business risk the ​$ ​million? No! The business purchased event insurance from a company specializing in promotions at sporting events. The event insurance company estimates the probability of a contestant winning the contest​ and, for a modest​ charge, insures the event. The promoters pay the insurance premium but take on no added risk as the insurance company will make the large payout in the unlikely event that a contestant wins. To see how it​ works, suppose that the insurance company estimates that the probability a contestant would win the contest is 0.0009 and that the insurance company charges ​$9,500

a. Calculate the expected value of the profit made by the insurance company.

In: Math

write the outline pseudocode (code is also allowed) for the following problem... Catherine wants to simulate...

write the outline pseudocode (code is also allowed) for the following problem...

Catherine wants to simulate a lottery game. What steps would this require?

Imagine that Catherine wants a computer to simulate a lottery game. The computer will be generating two-digit numbers. Each time the computer generates a number, the user is first invited to guess what the number is. If the user guesses the exact number, the award is 10 000 EUR. If the user makes a correct guess on one of the digits, and on the right place, the award is 3 000 EUR. If the user guesses correctly that a digit was selected, but not which position it is in, the award is 100 EUR.

Examples:

Computer: 96: Computer: 47: Computer: 42:

User: 96 User: 43 User: 29

Award Award Award

10 000 EUR 3 000 EUR

100 EUR

Catherine’s algorithm and program can follow the below-mentioned steps:

Step 1: The computer generates a random two-digit number.

Step 2: The user makes a guess of what the number is and enters it through the keyboard.

Step 3: The computer compares the two numbers and evaluates whether the user wins anything.

Step 4: The computer displays the number that was generated in step 1.
Step 5: the computer displays a message of whether the user wins something, as suggested

above.

Step 6: The computer repeats the procedure from step 1 to step 5. The game is played 3 times.

In: Computer Science

In the process of changing a flat tire, a motorist uses a hydraulic jack. She begins...

In the process of changing a flat tire, a motorist uses a hydraulic jack. She begins by applying a force of 41 N to the input piston, which has a radius r1. As a result, the output plunger, which has a radius r2, applies a force to the car. The ratio r2/r1 has a value of 8.6. Ignore the height difference between the input piston and output plunger and determine the force that the output plunger applies to the car.

In: Physics