Questions
1. Assume we roll 6 dice. What is the probability that the roll contains: a. 6...

1. Assume we roll 6 dice. What is the probability that the roll contains:

a. 6 of the same number

b. 3 of one number, 2 of a second number, and 1 non-matching number

c. 3 pairs of different numbers

In: Statistics and Probability

SHOW WORK 1. A surgery center has a procedure whose gross charge is $1,200 of which...

SHOW WORK

1. A surgery center has a procedure whose gross charge is $1,200 of which $800 is collected. The variable cost per procedure is $300. The monthly fixed cost assigned to doing this procedure is $40,000. The center wants to generate a $2,500 profit each month in doing this procedure.

a. How many procedures per month, rounding up to the next highest whole number if necessary, would it need to do to achieve its profit target?

b. How many procedures per month, rounding up to the next highest whole number, would it need to do to break-even?

c. On your Excel spreadsheet note the algebraic formula you used to solve these two problems. Using the Excel skills developed in the program so far, make your spreadsheet so that it prints on one page, and is readable. Use virtual cell references so that your work can be easily adapted to test other assumptions. Label each tab. Put your name in a footer on each tab. And, include your name in the filename.

In: Finance

Discuss how to find the maximum or minimum function whose highest exponential function is 2. Discuss,...

Discuss how to find the maximum or minimum function whose highest exponential function is 2. Discuss, if the highest exponential is 3.Discuss how to find the maximum or minimum function whose highest exponential function is 2. Discuss, if the highest exponential is 3.

In: Economics

A company is considering drilling four oil wells. The probability of success for each well is...

A company is considering drilling four oil wells. The probability of success for each well is 0.40, independent of the results for any other well. The cost of each well is $200,000. Each well that is successful will be worth $600,000.

a) What is the probability that one or more wells will be successful?

b) What is the expected number of successes?

c) What is the expected gain?

d) What will be the gain if only one well is successful?

e) Considering all possible results, what is the probability of a loss rather than a gain?

f) What is the standard deviation of the number of successes?

In: Statistics and Probability

A rare form of malignant tumor occurs in 11 children in a​ million, so its probability...

A rare form of malignant tumor occurs in 11 children in a​ million, so its probability is 0.000011. Four cases of this tumor occurred in a certain​ town, which had 15,359 children.

a. Assuming that this tumor occurs as​ usual, find the mean number of cases in groups of 15,359 children.

b. Using the unrounded mean from part ​(a​) ,find the probability that the number of tumor cases in a group of 15,359 children is 0 or 1.

c. What is the probability of more than one​ case?

d. Does the cluster of four cases appear to be attributable to random​ chance? Why or why​ not?

In: Statistics and Probability

A survey showed that 75​% of adults need correction​ (eyeglasses, contacts,​ surgery, etc.) for their eyesight....

A survey showed that

75​%

of adults need correction​ (eyeglasses, contacts,​ surgery, etc.) for their eyesight. If

1616

adults are randomly​ selected, find the probability that

no more thanno more than

1

of them need correction for their eyesight. Is

1

a significantly

lowlow

number of adults requiring eyesight​ correction?

The probability that

no more thanno more than

1

of the

16

adults require eyesight correction is

nothing .

​(Round to three decimal places as​ needed.)

Is

1

a significantly

lowlow

number of adults requiring eyesight​ correction? Note that a small probability is one that is less than 0.05.

In: Statistics and Probability

A rare form of malignant tumor occurs in 11 children in a​ million, so its probability...

A rare form of malignant tumor occurs in 11 children in a​ million, so its probability is 0.000011. Four cases of this tumor occurred in a certain​ town, which had

16,654 children.

a. Assuming that this tumor occurs as​ usual, find the mean number of cases in groups of

16,654

children.b. Using the unrounded mean from part

​(a​),

find the probability that the number of tumor cases in a group of

16,654

children is 0 or 1.

c. What is the probability of more than one​ case?

d. Does the cluster of four cases appear to be attributable to random​ chance? Why or why​ not?

In: Statistics and Probability

In your readings this module, you were introduced to Activity-Based Costing or ABC. It is a...

In your readings this module, you were introduced to Activity-Based Costing or ABC. It is a method used to determine a reliable predetermined benchmark for the allocation of overhead costs to the products produced based on their activity levels. In this discussion, we will work a case study on ABC together. For your initial response, attempt to answer the questions yourself and post all the required items into the Discussion Area. You may want to post some elements during different days so the class can work this problem together. Then in your response postings, help each other with misunderstandings or miscalculations.

Tasks: Examine the case below and then…

Calculate the amount of overhead allocated to small and large advertising campaigns under existing methods.

Apply activity-based costing to calculate the cost per cost driver for each of the cost pools.

Use the costs per cost driver to calculate the activity-based overhead applicable to small and large campaigns.

Calculate the percentage to be added to direct advertising costs to recover overhead costs under activity-based costing.

Merit-o-cracy PLC is a specialist advertising agency. It has been long-established but is experiencing difficulties in winning new business. The Chief Executive believes that its pricing methods are leading to the loss of large customer advertising campaigns while it is consistently winning smaller business.

Merit-o-cracy costs work for pricing purposes on the basis of direct advertising costs (i.e. space or time purchased from newspapers, radio and TV) plus 100%. The 100% is intended to cover all the overheads of the business, which run at $2 million per year. It does not include any profit margin. This budget cost comprises:

Creative staff $500,000

Production staff $750,000

Administrative & support staff $300,000

Rental and associated costs $450,000

Merit-o-cracy classifies its advertising campaigns as either small or large. Of the 350 campaigns the agency wins, about 325 are classified as small. A typical small advertising campaign incurs direct advertising costs of $4,000 each (and therefore is allocated $4,000 of overheads under current methods). The other 25 advertising campaigns are large and incur direct advertising costs of $28,000 each.

Merit-o-cracy’s accountant has heard of activity-based costing. After speaking to the management team, she has gathered information on the most common causes of costs. She believes that creative staff costs are linked to the number of advertising campaigns the agency competes for. Production staff costs are related to the number of advertising campaigns the agency wins. Administrative and support staff costs are related to the number of customers the agency has. Rental and associated costs are people-based and as a similar number of staff is employed in each of the three departments, the costs should be equally shared. The accountant has also collected data on the activity levels in each of the three departments over the budget period. These are:

Creative

800 advertising campaigns the agency bids for

400 of these are bids for large campaigns and 400 for small campaigns

Production

350 advertising campaigns the agency wins

325 of these are small campaigns and 25 large campaigns

Admin & support

400 customers the agency services

300 of these are customers with small campaigns and 100 have large campaigns

In: Accounting

2) This question is about providing game logic for the game of craps we developed its...

2) This question is about providing game logic for the game of craps we developed its shell in class. THe cpp of the class is attached to this project. At the end of the game,
you should ask user if wants to play another game, if so, make it happen. Otherwise quit.

Here is the attached cpp file for que2:-

/***
This is an implementation of the famous 'Game of Chance' called 'craps'.
It is a dice game. A player rolls 2 dice. Each die has sixe faces: 1, 2, 3, 4, 5, 6.
Based on the values on the dice we play the game until a player wins or loose.
You add the values of the dice's face.
1) If the sum is 7 or 11 on the first roll, the player wins.
2) If the sum is 2, 3, or 12 on the first roll, the player loses ( or the 'house' wins)
3) If the sum is 4, 5, 6, 8, 9, or 10 on the first roll, then that sum becomes the player's 'point'.
4)To win, player must continue rolling the dice until he/she 'make the point'.
5)If the player rolls a 7 he/she loses.
***/

#include <cstdlib>
#include <ctime>
#include <iostream>
#include <random>

enum class Status { CONTINUE, WON, LOST};

unsigned int rollDice(); // forward declaration of rollDice() function. It rolls 2 dice, displays the sum and return it.
unsigned int rollDiceAdvanced(); // same as above, but used advance c++ Random Number generation.

   // global variable to use in the advanced version of RNG (Random number Generator)
std::default_random_engine engine{ static_cast<unsigned int>(time(0)) };
std::uniform_int_distribution<unsigned int> randomInt{ 1, 6 };

int main()
{
   Status gameStatus; // can be CONTINUE, WON, or LOST
   unsigned int myPoint{ 0 };
   // either use the base rand() seeding
   srand(static_cast<unsigned int>(time(0))); //dandomizes rand() function.

   // but here a sample of using the random number generation:   // just testing:
   for (int i = 0; i < 20; ++i)
   {
       rollDice();
       rollDiceAdvanced();
   }

   unsigned int sumOfDice = rollDiceAdvanced(); // first roll of dice.

   // bellow the game logic: Student going to implement this.

   return 0;
}

// here is the simple version of rollDice(); throws 2 dice, each having faces 1 to 6, and return the sum.
unsigned int rollDice()
{
   unsigned int firstRoll{ 1 + static_cast<unsigned int>(rand()) % 6 }; // could be 0, 1, 2, 3, 4, 5, because 8 % 6 == 2, 7 %6 1, 9%6 == 3, 17%6 == 5, 18%6 ==0
   unsigned int secondRoll{ 1 + static_cast<unsigned int>(rand()) % 6 };
   unsigned int sum{ firstRoll + secondRoll };
   std::cout << "rollDice: " << sum << std::endl;
   return sum;
}


// this is distribution based random number generation in c++
unsigned int rollDiceAdvanced()
{
   unsigned int firstRoll{ randomInt(engine) };
   unsigned int secondRoll{ randomInt(engine) };
   unsigned int sum{ firstRoll + secondRoll };
   std::cout << "rollDiceAdvance: " << sum << std::endl;
   return sum;
}

Thanks for help

In: Computer Science

Please use Python 21. Rock, Paper, Scissors Game Write a program that let's the user play...

Please use Python

21. Rock, Paper, Scissors Game Write a program that let's the user play the game of rock, paper, scissors against the computer. The program should work as follows: 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computers choice yet.) 2. The user enters his or her choice of “rock,” “paper,” or “scissors” at the keyboard. 3. The computer’s choice is displayed. 4. A winner is selected according to the following rules: - If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) - If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) - If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock) - If both players make the same choice, the game must be played again to determine the winner.

Here is what I have but I keep getting an error.

import random

def generateRandomNumber():
randomNumber = random.randint(1, 3)
return randomNumber

def getComputerChoice( randomNumber ):
if randomNumber == 1:
computerChoice = "rock"
elif randomNumber == 2:
computerChoice = "paper"
elif randomNumber == 3:
computerChoice = "scissors"
  
return computerChoice

def getUserChoice():
userChoice = input("please enter your choice:")
return userChoice

def determineWinner( userChoice, computerChoice):
rockMessage = "The rock smashes the scissors"
scissorMessage = "Scissors cuts paper"
paperMessage = "Paper wraps rock"
winner = "no winner"
message = ""
  
if computerChoice == "rock" and userChoice == "scissors":
winner = "Computer"
message = rockMessage
elif computerChoice == "scissors" and userChoice == "rock":
winner = "You"
message = rockMessage
  
if computerChoice == "scissors" and userChoice == "paper":
winner = "Computer"
message = scissorMessage
elif computerChoice == "paper" and userChoice == "scissors":
winner = "You"
message = scissorMessage
  
if computerChoice == "paper" and userChoice == "rock":
winner = "Computer"
message = paperMessage
elif computerChoice == "rock" and userChoice == "paper":
winner = "You"
message = paperMessage
  
return winner, message

def startAgain():
randomNumber = generateRandomNumber()
computerChoice = getComputerChoice( randomNumber)
userChoice = getuserChoice()
print( "The computer chose", computerChoice)
winner, message = determineWinner( computerChoice, userChoice )
  
if winner != "no winner":
print( winner, "won(", message, ")" )
  
return winner

def main():
randomNumber = generateRandomNumber()
computerChoice = getComputerChoice( randomNumber)
userChoice = getuserChoice()
print( "The computer chose", computerChoice)
winner, message = determineWinner( computerChoice, userChoice )
  
if winner != "no winner":
print( winner, "won(", message, ")" )
  
while winner == "no winner":
winner = startAgain()
main()

NameError                                 Traceback (most recent call last)
<ipython-input-2-a1b2d5e39fa7> in <module>
     73     while winner=="no winner":
     74         winner = startAgain()
---> 75 main()

<ipython-input-2-a1b2d5e39fa7> in main()
     64     randomNumber = generateRandomNumber()
     65     computerChoice = getComputerChoice( randomNumber)
---> 66     userChoice = getuserChoice()
     67     print( "The computer chose", computerChoice)
     68     winner, message = determineWinner( computerChoice, userChoice )

NameError: name 'getuserChoice' is not defined

In: Computer Science