Questions
For this final problem we will create two samples of dice rolls. First You need to...

For this final problem we will create two samples of dice rolls. First You need to roll two dice in the standard way 25 times and record the results. Then roll two dice in a “lucky” way 25 times and record the results. As you complete this problem use the known standard deviation for the sum of two dice : σ1 = 2.415 and σ2 = 2.415

(a) Write down the results of your rolls and find the average for the first sample, ¯x1, and the ”lucky” sample, ¯x2

x1-x2
10 5
7 5
9 4
3 11
11 9
7 8
6 7
10 11
6 5
11 4
8 8
7 5
10 7
10 7
11 8
8 2
5 4
8 11
11 5
12 6
6 3
3 5
10 7
11 8
7 7

(b) Create a 95% confidence interval for the difference in the averages of the two samples, µ1 − µ2.

(c) Create a hypothesis test to determine whether the average of the second sample is greater than the average of the first sample. Be sure to include:

i. The null and alternative hypotheses

ii. The test statistic (and how it was calculated)

iii. The p-value (and how it was calculated)

iv. Your conclusion with α = 0.05. Does this conclusion mean that the “lucky” rolls land on higher numbers than the regular rolls

In: Statistics and Probability

Write a Java program (name it PasswordTest) that reads from the user a string input (representing...

Write a Java program (name it PasswordTest) that reads from the user a string input (representing a password) and determines whether the password is “Valid Password” or “Invalid Password”. A valid password has at least 7 characters and includes at least one lower-case letter, at least one upper-case letter, at least one digit, and at least one character that is neither a letter nor a digit. Your program will need to check each character in the string in order to render a verdict. For example, CS5000/01 is invalid password; however, Cs5000/01 is a valid password. The program should display the entered password and the judgment as shown in the following sample runs:

Entered Password: CS5000/01

Verdict: Invalid Password

Entered Password: Cs5000/011

Verdict: Valid Password

Entered Password: MyOldDogK9

Verdict: Invalid Password

Entered Password: MyOldDogK9#

Verdict: Valid Password

Entered Password: Ab1#

Verdict: Invalid Password

Document your code, and organize and space out your outputs as shown. Design your program such that it allows the user to re-run the program with different inputs in the same run (i.e., use a sentinel loop structure).

In: Computer Science

Four bounds with 6, 12, 18, and 24 months of maturity and $10,000 face value are...

Four bounds with 6, 12, 18, and 24 months of maturity and $10,000 face value are selling for $9,400, $8,900, $9,484, and $9,625 respectively. The first two are discount bonds, the third one pays 8% and the last one pays 9% /year coupon semi-annually. Using the bootstrapping method, calculate the 6, 12, 18, and 24 month zero rates.

In: Finance

a) Demand for blue jeans in a competitive market is given by P=130-.003Qd. Supply for Blue...

a) Demand for blue jeans in a competitive market is given by P=130-.003Qd. Supply for Blue jeans is given by P=5+.002Qs. Assuming the market is taken over by a monopolist, how much surplus is lost by the market?

In: Economics

Jiminy’s Cricket Farm issued a bond with 30 years to maturity and a semiannual coupon rate...

Jiminy’s Cricket Farm issued a bond with 30 years to maturity and a semiannual coupon rate of 6 percent 3 years ago. The bond currently sells for 92 percent of its face value. The company’s tax rate is 40 percent. The book value of the debt issue is $50 million. In addition, the company has a second debt issue on the market, a zero coupon bond with 12 years left to maturity; the book value of this issue is $50 million, and the bonds sell for 54 percent of par.

What is the company’s total book value of debt? (Enter your answer in dollars, not millions of dollars, e.g. 1,234,567.)

  Total book value $   

What is the company’s total market value of debt? (Enter your answer in dollars, not millions of dollars, e.g. 1,234,567.)

  Total market value $   

What is your best estimate of the aftertax cost of debt? (Do not round intermediate calculations. Enter your answer as a percent rounded to 2 decimal places, e.g., 32.16.)

  Cost of debt %

In: Finance

directions: use c++ Create a  ContactInfo class that contains the following member variables: name age phoneNumber The...

directions: use c++

Create a  ContactInfo class that contains the following member variables:

  • name
  • age
  • phoneNumber

The ContactInfo class should have a default constructor that sets name = "", phoneNumber = "", and age = 0.

The ContactInfo class should have a constructor that accepts the name and phone number as parameters and sets name = <value of parameter name>, aAge = 0, and phoneNumber = <value of parameter phone number>.

The ContactInfo class should have accessor and mutator functions for each member variable.

The ContactInfo class should have a function called canVote that returns a boolean. It will return true if age is >= 18. Otherwise, it will return false.

Create three instances of this class in the main function

Write a C++ function (outside of the class) that will display (as shown below in the sample run) an instance of the ContactInfo class. Call the function to display the three instances you created in the main function.

Make sure your program conforms to the following requirements:
1. This program should be called ContactInfoApp.cpp. The header file should be called ContactInfo.h and place member function definitions in ContactInfo.cpp. You must submit these three files.

Include the basic header in your program. (5 points deduction if missing)

2. Properly set up the ContactInfo class and declare three instances of ContactInfo (45 points)

3. Write a C++ program that will create and display (as shown below in the sample run) three instances of the ContactInfo class. (25 points).

4. Add comments wherever necessary. (5 points)

Sample Run:

NOTE: not all possible runs are shown below.

Name: Kristen Lee
Phone Number: 555-2021
Age: 45
Can vote?: Yes

Name: Joe Smith
Phone Number: 111-9999
Age: 5
Can vote?: No

Name: Tom Hanks
Phone Number: 111-8888
Age: 75
Can vote?: Yes

General Requirements:

1) Include the header comment with your name and other information on the top of your files.

2. Please make sure that you're conforming to specifications (program name, print statements, expected inputs, and outputs, etc.). Not doing so will result in a loss of points. This is especially important for prompts. They should match mine EXACTLY.

3. If we have listed a specification and allocated a point for it, you will lose points if that particular item is missing from your code, even if it is trivial.

4. No global variables (variables outside of main) unless they are constants.

5. All input and output must be done with streams, using the library iostream

6. You may only use the iostream, iomanip, and string libraries. Including unnecessary libraries will result in a loss of points.

7. NO C style printing is permitted. (Aka, don't use printf). Use cout if you need to print to the screen.

8. When you write source code, it should be readable and well-documented (comments).

9. Make sure you test using G++ (to be sure it reports no compile errors or warnings!) before you submit the program.

10. Testing your program thoroughly is a part of writing good code. We give you sample runs to make sure you match our output requirements and to get a general idea of how we would test your code. Matching your outputs for JUST the sample runs is not a guarantee of a 100. We have several extensive test cases.

11. Program submissions should be done through the Canvas class page, under the assignments tab (if it's not there yet I'll create it soon.) Do not send program submissions through e-mail { e-mail attachments will not be accepted as valid submissions.

12. The four files you will submit via Canvas are ContactInfoApp.cpp, ContactInfo.h, ContactInfo.cpp, and your makefile.

13. Please make sure you've compiled and run your program before you turn it in. Compilation errors can be quite costly. We take 4 points per compiler error for the first 9 errors. The 10th compiler error will result in a grade of 0.

14. Only a file turned in through Canvas counts as a submission. A file on your computer, even if it hasn't been edited after the deadline, does not count. Now that you are familiar with the process of turning in a file through Canvas, we will not accept any excuses.

15. The student is responsible for making sure they have turned in the right file(s). We will not accept any excuses about inadvertently modifying or deleting files, or turning in the wrong files.

16. General Advice - always keep an untouched copy of your finished homework files in your email. These files will have a time-stamp which will show when they were last worked on and will serve as a backup in case you ever have legitimate problems with submitting files through Canvas. Do this for ALL programs.

In: Computer Science

A long cylindrical wire made of a magnetic metal with relative permeability has a uniform current...

A long cylindrical wire made of a magnetic metal with relative permeability has a uniform current density J flowing along its length. An insulated wire runs along the axis of the cylinder and carries a current I. Find the magnetic field, magnetic induction, magnetization, and bound currents in the magnetic material.

In: Physics

5c. Milly (mass 60.9 kg) runs at 4.11 m/s along the positive x-axis and then jumps...

5c.

Milly (mass 60.9 kg) runs at 4.11 m/s along the positive x-axis and then jumps onto a stationary 112 kg box. Milly and the box slide across the floor for distance 0.244 m, and then they come to a stop. Find the coefficient of kinetic friction between the box and the floor.

In: Physics

The product offers life protection, savings and even has investment component. Even though it runs for...

  1. The product offers life protection, savings and even has investment component. Even though it runs for a specified period, life assurance companies are flexible to extend cover so that they make sure that money became available to the policyholders dependents on their death.

Identify and describe the variations under this product.                            [25 marks]

In: Finance

2. In a closed economy, how would each of the following events affect bond price and...

2. In a closed economy, how would each of the following events affect bond price and market interest rate? Use the figures of both bond market and market of loanable funds to illustrate the changes to the interest rates.

A. The expected rate of inflation decreases.

B. The federal government runs a budget deficit.

In: Economics