Questions
Consider a casino game that an individual (Joe) wants to play. It costs him N dollars...

Consider a casino game that an individual (Joe) wants to play. It costs him N dollars each time to play. He loves this game and wants to continue playing until he is either broke or he breaks the bank (wins all the money). The probability of winning is p; the probability of losing is q. These are fixed probability values every time the game is played.

Joe brought $M to the casino. Every time one plays you either lose the entrance fee ($N) or you win and are paid back D dollars.

(a) How much money does Joe expect to have after playing n times? Derive a formula for how much money he has.

(b) Suppose Joe starts with $100, p=0.3, q=0.7, N=$5, and D=$20. Is it likely that Joe will break the bank?

(c) If the answer to (b) is no, how many times is it likely that Joe can play this game before he is broke?

In: Math

1.For a manufacturing application, a hollow stainless steel cylinder is to be produced into which another...

1.For a manufacturing application, a hollow stainless steel cylinder is to be produced into which another cylinder is to slide into. For example, this might be a piston in a car engine. Suppose the outer cylinder diameter is normally distributed with mean 25 mm and standard deviation 1.5 mm, and the inner cylinder diameter is normally distributed with mean 24.5 mm and standard deviation 0.5 mm. Find the

1) mean of the difference of the outer cylinder diameter minus the inner cylinder diameter.

2) standard deviation of the difference

3) probability that the difference is greater than 0.1 mm. (This would ensure that the inner cylinder can slide into the outer cylinder.)

2.Suppose X1, X2 and X3 are independent random variables with mean 3.5 and standard deviation 1.5. Find the mean and standard deviation of Y = X1 − X2 + 2X3.

In: Statistics and Probability

a bank found that the average monthly checking balance of its customers is $10000 with a...

a bank found that the average monthly checking balance of its customers is $10000 with a standard deviation of $4500. a random sample of 12 accounts is selected.

1. what is the probability that the average checking balance will be more than 13000

2. what is the probability that the monthly balance will be less than 4000

3.assume that this bank offers a special credit card to one percent of its customers with the highest checking balance. what is the minimum amount a customer should have to be eligible for that credit card?

In: Statistics and Probability

Rock, Paper, Scissors Game Write a Python program rps.py that lets the user play the game...

Rock, Paper, Scissors Game

Write a Python program rps.py that lets the user play the game of Rock, Paper, Scissors against the computer.

The program should work as follows:

You can set these constant global variables at the top outside of your main function definition:

COMPUTER_WINS = 1

PLAYER_WINS = 2

TIE = 0

INVALID = 3

ROCK = 1

PAPER = 2

SCISSORS = 3

For this program 1 represents rock, 2 represents paper, and 3 represents scissors.

In your main function:

- Ask the user to choose rock, paper, or scissors like so: 'Enter 1 for rock, 2 for paper, 3 for scissors: ' set the value to a variable called 'player'.

- Generate a random number between 1 and 3 for the computer. Set that value to a variable called 'computer'. 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 computer's choice yet.)

- Call your choiceString(choice) function to print the computer's hand like so:

'Computer chose ....'

- Call your choiceString(choice) function to print the player's hand like so:

'Player chose ....'

- Call your value returning function rockPaperScissors(computer, player) to get the result of the round between the computer and player.

- If the result is tie, print 'You made the same choice as the computer. Starting over' and repeat the process until there is no tie.

- Declare if the computer is the winner with 'The computer wins the game' or whether the player is the winner with 'You win the game' or if there was an invalid choice print 'You made an invalid choice. No winner'. If they made an invalid choice you do not need to loop through again.

In the main, please comment each of the above bullet points (5 points)

Outside of your main, define the following functions:

rockPaperScissors(computer, player):

[value returning function]

This takes in integers representing the computer and player's 'hand' so to speak of rock, paper, or scissors as arguments.

It returns one of the following values:

TIE

PLAYER_WINS

COMPUTER_WINS

INVALID

Using conditionals, based on the arguments passed into the function, determine which value to return based on these rules:

If one player chooses rock and the other player chooses scissors, then rock wins.

(Rock smashes 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.

choiceString(choice)

Value returning function that takes in the argument choice (the number representing rock, paper, or scissors) and return one of the following strings:

'rock'

'paper'

'scissors'

'Something went wrong'

In other words, the function returns the string value of the integer being passed in as an argument.

In: Computer Science

Implement in C++ Design a BookstoreManager class which creates a dynamic array of type Book (don’t...

Implement in C++ Design a BookstoreManager class which creates a dynamic array of type Book (don’t use vectors), and provide an implementation for the following operations on books in the array

1)isEmpty() returns true if the array is empty, otherwise false

2)isFull() returns true if the array is full, otherwise false

3)listSize() prints the number of books in the array

4)print() prints the content of the array

5)insert(Book) asks the user to enter new book info, and it adds the book to the array in sorted order if the array is full, it’ll double the size of the array

6)remove(Book) asks the user to enter ISBN info, and it removes the book from the array; shifts the other elements up in the array. Prints “Not Found” if the search fails.

7) removePublisher(string) asks the user to enter the publisher's name, and it removes all the books with the same publisher from the array; shifts the other elements up in the array. Prints “Not Found” if the search fails.

8) search(Book) asks the user to enter ISBN, and prints the content of the book prints “Not Found”, if the book is not found

In: Computer Science

Implement in C++ Design a BookstoreManager class which creates a dynamic array of type Book (don’t...

Implement in C++ Design a BookstoreManager class which creates a dynamic array of type Book (don’t use vectors), and provide an implementation for the following operations on books in the array

1)isEmpty() returns true if the array is empty, otherwise false

2)isFull() returns true if the array is full, otherwise false

3)listSize() prints the number of books in the array

4)print() prints the content of the array

5)insert(Book) asks the user to enter new book info, and it adds the book to the array in sorted order if the array is full, it’ll double the size of the array

6)remove(Book) asks the user to enter ISBN info, and it removes the book from the array; shifts the other elements up in the array. Prints “Not Found” if the search fails.

7) removePublisher(string) asks the user to enter the publisher's name, and it removes all the books with the same publisher from the array; shifts the other elements up in the array. Prints “Not Found” if the search fails.

8) search(Book) asks the user to enter ISBN, and prints the content of the book prints “Not Found”, if the book is not found

In: Computer Science

Winning team data were collected for teams in different​ sports, with the results given in the...

Winning team data were collected for teams in different​ sports, with the results given in the table below. Use the​ TI-83/84 Plus results at a

0.050.05

level of significance to test the claim that​ home/visitor wins are independent of the sport.

​TI-83/84 PLUS

chi squared minus Testχ2−Test

  chi squared equals 3.076409776χ2=3.076409776

  Upper P equals 0.3799936722P=0.3799936722

  df equals 3df=3

BasketballBasketball

Baseball

Hockey

Football

Home team winsHome team wins

111111

6767

5454

4141

Visiting team winsVisiting team wins

7474

5656

4343

4343

Fail to reject

Reject

the null hypothesis that​ home/visitor wins are independent of the sport. It appears that the​ home-field advantage

does

does not

depend on the sport.

In: Statistics and Probability

write a 2-minute sales Elevator Pitch script for an EXISTING product of your choice. Use 5...

write a 2-minute sales Elevator Pitch script for an EXISTING product of your choice. Use 5 real Statistics to back up your case. Research them and make sure they are real statistics.

In: Statistics and Probability

Assume the average weight of a player in the NFL is normally distributed with a population...

Assume the average weight of a player in the NFL is normally distributed with a population mean of 245 pounds with a population standard deviation of 46 pounds. Suppose we take a sample of 50 NFL players.

a. What is the probability that a randomly selected player will weigh over 300 pounds?

b. What is the probability that a randomly selected player will weigh under 180 pounds?

c. What is the probability that a randomly selected player will weigh between 190 and 320 pounds?

d. What is the probability that the average weight of players from the sample of 50 will be above 260?

e. What weight defines the lowest 34.09% of the distribution for an individual player?

f. What weight defines the highest 7.93% of the distribution for an individual player?

In: Statistics and Probability

The ledger of Camila Ramirez and Ping Xue, attorneys-at-law, contains the following accounts and balances after...

The ledger of Camila Ramirez and Ping Xue, attorneys-at-law, contains the following accounts and balances after adjustments have been recorded on December 31, 20Y2:

Ramirez and Xue
Trial Balance
December 31, 20Y2
Debit Balances Credit Balances
Cash 51,200
Accounts Receivable 48,800
Supplies 1,800
Land 122,000
Building 132,400
Accumulated Depreciation—Building 76,300
Office Equipment 56,100
Accumulated Depreciation—Office Equipment 23,700
Accounts Payable 36,400
Salaries Payable 3,900
Camila Ramirez, Capital 120,000
Camila Ramirez, Drawing 54,900
Ping Xue, Capital 73,200
Ping Xue, Drawing 79,300
Professional Fees 444,200
Salary Expense 178,100
Depreciation Expense—Building 17,700
Property Tax Expense 11,000
Heating and Lighting Expense 8,800
Supplies Expense 6,300
Depreciation Expense—Office Equipment 5,500
Miscellaneous Expense 3,800
777,700 777,700

The balance in Xue' capital account includes an additional investment of $12,000 made on May 5, 20Y2.

Required:

1. Prepare an income statement for 20Y2, indicating the division of net income. The partnership agreement provides for salary allowances of $49,000 to Ramirez and $60,000 to Xue, allowances of 10% on each partner's capital balance at the beginning of the fiscal year, and equal division of the remaining net income or net loss.

Ramirez and Xue
Income Statement
For the Year Ended December 31, 20Y2
Professional Fees
Operating expenses:
Salary Expense
Depreciation Expense-Building
Property Tax Expense
Heating and Lighting Expense
Supplies Expense
Depreciation Expense-office Equipment
Miscellaneous Expense
  Total operating expenses
Net Income $

2. Prepare a statement of partnership equity for 20Y2. If any amounts are zero, enter in "0".

Ramirez and Xue
Statement of Partnership Equity
For the Year Ended December 31, 20Y2
Camila Ramirez Ping Xue Total
Balances, January 1, 20Y2
Capital additions
Net income for the year
Partner withdrawals
Balances, December 31, 20Y2 $ $ $

3. Prepare a balance sheet as of the end of 20Y2.

Ramirez and Xue
Balance Sheet
December 31, 20Y2
Assets
Current assets:
  Total current assets $
Property, plant, and equipment:
Total property, plant, and equip.
Total assets $
Liabilities
Current liabilities:
Total liabilities
Partners' Equity
Total partners' equity
Total liabilities and partners' equity $

In: Accounting