A company has sales of automobiles in the past three years as given in the table below. Using trend and seasonal components, predict the sales for each quarter of year 4.
|
Year |
Quarter |
Sales |
|
1 |
1 |
71 |
|
2 |
49 |
|
|
3 |
58 |
|
|
4 |
78 |
|
|
2 |
1 |
68 |
|
2 |
41 |
|
|
3 |
60 |
|
|
4 |
81 |
|
|
3 |
1 |
62 |
|
2 |
51 |
|
|
3 |
53 |
|
|
4 |
72 |
In: Math
Given the matrix

a. Sort each column and store the result in an array B.
b. Sort each row and store the result in an array C.
c. Add each column and store the result in an array D.
d. Add each row and store the result in an array E.
In: Mechanical Engineering
Consider the surfaces x^2 + y^2 + z^2 = 1 and (z +√2)2 = x^2 +
y^2, and let (x0, y0, z0) be a point
in their intersection. Show that the surfaces are tangent at this
point, that is, show that the
have a common tangent plane at (x0, y0, z0).
In: Advanced Math
1. List the possible rational zeros of the the polynomial function. Do not find the zeros.
f ( x ) = 3 x 5 − 5 x 2 + 6 x − 1
A) ± 1 , ± 3
B) ± 1 , ± 1 3
C) ± 1 , ± 1 3 , ± 3
D) ± 3 , ± 1 3
Group of answer choices
A
B
C
D
2. Find zeros and write the polynomial in factored form.
P ( x ) = 4 x 3 − 11 x 2 − 6 x + 9
A) − 1 , 3 4 , 3 ; P ( x ) = ( 4 x − 3 ) ( x − 3 ) ( x + 1 )
B)− 1 , 4 3 , − 3 ; f ( x ) = ( 4 x − 3 ) ( x − 3 ) ( x + 1 )
C) − 3 , 3 4 , 1 ; f ( x ) = ( 4 x − 3 ) ( x − 1 ) ( x + 3 )
D) 1 , 4 3 , − 3 ; f ( x ) = ( 4 x − 3 ) ( x − 1 ) ( x + 3 )
Group of answer choices
A
B
C
D
3. Find a polynomial P ( x ) of degree 3 that has integer coefficients and zeros 1 + i and 8
A) P ( x ) = x 3 + 6 x 2 + 16 x − 14
B) P ( x ) = x 3 + x 2 − 14 x + 16
C) P ( x ) = x 3 − 8 x 2 − 14 x − 12
D) P ( x ) = x 3 + 6 x 2 − 14 x + 16
Group of answer choices
A
B
C
D
4. Given f ( x ) = 2 x + 6and g ( x ) = 4 x 2 + 1. Find ( g ∘ f ) ( 1 ).
5. The function f is one-to-one. Find its inverse.
f ( x ) = ( x + 2 ) 3 − 8
A) f − 1 ( x ) = x + 8 3 − 2
B) f − 1 ( x ) = x + 10 3
C) f − 1 ( x ) = x + 6 3
D) f − 1 ( x ) = x − 2 3 + 8
Group of answer choices
A
B
C
D
7. Find the domain of the function.
f ( x ) = log 7 ( 9 − x 2 )
A) ( − ∞ , − 2 ) ∪ ( 2 , ∞ )
B) ( − 2 , 2 )
C) ( − 4 , 4 )
D) [ − 2 , 2 ]
Group of answer choices
A
B
C
D
10. Find the amount in a savings account at the end of 9 years if the amount originally deposited is $9000 and the interest rate is 7% compounded semiannually. Round your answer in two decimal places.
Group of answer choices
A) $12,266.08
B) $18,389.14
C) $167,670.00
D) 16,717.40
11. Find out how long it takes a $2900 investment to double if it is invested at 7% compounded semiannually. Round to the nearest tenth of a year.
Group of answer choices
A) 10.3 yr
B) 10.1 yr
C) 9.9 yr
D) 10.5 yr
In: Math
Write a MATLAB program to simulate the Stuck in the Mud game, The following link contains the detail game description: https://www.activityvillage.co.uk/stuck-in-the-mud , with additional features that can:
• Use five (5) 6-sided dice to automatically play the Stuck in the Mud game against a player.
• Greet the player when the game starts.
• Let the player to choose the number of rounds to play. Take care of the user input to ensure the program will not crash with inputs like 0, 1.2, -1, 999, and so on...
• The program should not play if the user enters a 0 or any negative value.
• The program should accurately play the number of rounds specified by the user. The player and the computer play in turns for each round.
• The program can always pick one side to start the game first, either the player side or the computer side. Randomly pick a side to start the rotation is optional.
• Print the current round number clearly in the command window.
• If the player side starts first, the program will automatically roll all five (5) dice for the player. If the player rolled any 2s or 5s, the player does not score any points for this throw. The player can only score on a roll which does not include the number 2 and 5. Any dice with a 2 or a 5 becomes stuck in the mud. If this throw does not contain any 2s or 5s, the score is incremented by the sum of the dice values. The player needs to set aside any 2s and 5s and throw the remaining dice. Again, if any 2s or 5s are rolled, the score will not be incremented for this throw. Throws without 2s and 5s are added to the previous total score. Continue in this way until all the dice are stuck.
• The dice rolled for the player, the stuck dice, and the scores during the process should clearly be printed in the command window.
• The program then automatically roll all five (5) dice for the computer. Follow the game rules until all five (5) dice are stuck.
• The dice rolled for the computer, the stuck dice, and the scores during the process should also be clearly printed in the command window. • Accurately track the total scores for the player and the computer.
• After all the rounds have been played, select a winner based on the highest total score. It is also possible that the game ends in a tie.
• Add voice to the game to report the details of the game for the player.
o Preloaded voices can be found here
https://drive.google.com/file/d/0B2evz1N1HPsoYlRvd1BLb0k5UHM/view?usp=sharing
o The following websites can convert any text into voices with downloadable mp3 files.
§ www.fromtexttospeech.com
§ www.text2speech.org
o If you have a mic, you can also record your own voice using the Windows Sound Recorder.
o MATLAB can play any WMA, MP3, MPEG-4 AAC, WAV, FLAC audio files. [y,Fs] = audioread('fileName.mp3'); % read sound file sound(y,Fs); % play sound file o Additional sound effects are welcome.
• Add voice to greet the player.
• Add voice to ask the player to enter the number of rounds to play.
• Add voice to announce the current round number (i.e., round 1, round 2, and so on…).
• Add voice to announce the current turn (i.e. the player is rolling or the computer is rolling). • Add voice to announce the current roll number (i.e. roll 1, roll 2, and so on…).
• Add voice to announce each dice rolled.
• Add voice to announce the sum of the score for the current turn after each throw.
• Add voice to announce the number of dice stuck after each throw.
• After one side played, add voice to announce the current total score for the side. For example, 35 points can be announced as three-five.
• After all the rounds are played, add voice to announce the winner or tie.
Add pause as needed between sentences to ensure one sentence is finished before the next sentence starts.
Use at least one user-defined function in the program to reduce code repetition.
The finished program can look like the following example. Extra components are always welcome.
(Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: 2
ROUND 1!!! (Announce round #1.)
The player starts first: (Announce the player’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 5 1 4 5 6 (Announce rolling 5-1-4-5-6.)
Stuck in the mud: 5 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 2 (Announce roll #2.)
Rolling: 2 2 2 (Announce rolling 2-2-2.)
Stuck in the mud: 5 2 2 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The player scores: 0 (Announce the player score: 0)
The Player Total Scored: 0 (Announce the player total score: 0)
The computer goes next: (Announce the computer’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 2 4 3 5 4 (Announce rolling 2-4-3-5-4.)
Stuck in the mud: 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 2 (Announce roll #2.)
Rolling: 1 2 4 (Announce rolling 1-2-4.)
Stuck in the mud: 2 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 3 (Announce the number of dice stuck: 3)
ROLL 3 (Announce roll #3.)
Rolling: 4 2 (Announce rolling 4-2.)
Stuck in the mud: 2 2 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 4 (Announce roll #4.)
Rolling: 5 (Announce rolling 5.)
Stuck in the mud: 2 5 2 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The computer scores: 0 (Announce the computer score: 0)
The Computer total scored: 0 (Announce the computer total score: 0)
ROUND 2!!! (Announce round #2.)
The player starts first: (Announce the player’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 2 4 4 2 5 (Announce rolling 2-4-4-2-5.)
Stuck in the mud: 2 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 3 (Announce the number of dice stuck: 3)
ROLL 2 (Announce roll #2.)
Rolling: 2 2 (Announce rolling 2-2.)
Stuck in the mud: 2 2 2 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The player scores: 0 (Announce the player score: 0)
The Player Total Scored: 0 (Announce the computer score: 0)
The computer goes next: (Announce the computer’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 4 4 1 1 1 (Announce rolling 4-4-1-1-1.)
Stuck in the mud:
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 0 (Announce the number of dice stuck: 0)
ROLL 2 (Announce roll #2.)
Rolling: 1 4 5 6 4 (Announce rolling 1-4-5-6-4.)
Stuck in the mud: 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 1 (Announce the number of dice stuck: 1)
ROLL 3 (Announce roll #3.)
Rolling: 6 5 1 1 (Announce rolling 6-5-1-1.)
Stuck in the mud: 5 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 4 (Announce roll #4.)
Rolling: 2 5 1 (Announce rolling 2-5-1.)
Stuck in the mud: 2 5 5 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 5 (Announce roll #5.)
Rolling: 5 (Announce rolling 5.) Stuck in the mud: 2 5 5 5 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The computer scores: 11 (Announce the computer score: 1-1)
The Computer total scored: 11 (Announce the computer total score: 1-1)
The computer wins! (Announce the computer wins.)
>>
The program should end when the player wants to play 0 round.
(Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: 0
The game ends with a tie (Announce the game ends in a tie.)
The program should be able to handle a negative input.
(Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: -1
The game ends with a tie (Announce the game ends with a tie.)
>>
The program should be able to handle a floating point input without crashing.
(The following example takes the floor value of 1.2 and only runs 1 round. )
(Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: 1.2
ROUND 1!!! (Announce round #1.)
The player starts first: (Announce the player’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 3 6 2 2 6 (Announce rolling 3-6-2-2-6.)
Stuck in the mud: 2 2 Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 0)
ROLL 2 (Announce roll #2.)
Rolling: 4 4 4 (Announce rolling 4-4-4.)
Stuck in the mud: 2 2
Game score: 12 (Announce the score: 1-2)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 3 (Announce roll #3.)
Rolling: 3 1 5 (Announce rolling 3-1-5.)
Stuck in the mud: 2 2 5
Game score: 12 (Announce the score: 1-2)
Number of dice stuck: 3 (Announce the number of dice stuck: 3)
ROLL 4 (Announce roll #4.)
Rolling: 6 5 (Announce rolling 6-5.)
Stuck in the mud: 5 2 2 5
Game score: 12 (Announce the score: 1-2)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 5 (Announce roll #5.)
Rolling: 1 (Announce rolling 1.)
Stuck in the mud: 5 2 2 5
Game score: 13 (Announce the score: 1-3)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 6 (Announce roll #6.)
Rolling: 1 (Announce rolling 1.)
Stuck in the mud: 5 2 2 5
Game score: 14 (Announce the score: 1-4)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 7 (Announce roll #7)
Rolling: 5 (Announce rolling 5.)
Stuck in the mud: 5 5 2 2 5
Game score: 14 (Announce the score: 1-4)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The player scores: 14 (Announce the player score: 1-4)
The Player Total Scored: 14 (Announce the player total score: 1-4)
The computer goes next: (Announce the computer’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 6 5 6 4 2 (Announce rolling 6-5-6-4-2.)
Stuck in the mud: 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 2 (Announce roll #2.)
Rolling: 2 4 5 (Announce rolling 2-4-5.)
Stuck in the mud: 2 5 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 3 (Announce roll #3.)
Rolling: 4 (Announce rolling 4.
Stuck in the mud: 2 5 5 2
Game score: 4 (Announce the score: 4)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 4 (Announce roll #4.)
Rolling: 2 (Announce rolling 2.)
Stuck in the mud: 2 5 2 5 2
Game score: 4 (Announce the score: 4)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The computer scores: 4 (Announce the computer score: 4)
The Computer total scored: 4 (Announce the computer total score: 4)
The player wins! (Announce the player wins.)
In: Computer Science
Write a Java program that reads a list of integers into an array. The program should read this array from the file “input.txt”. You may assume that there are fewer than 50 entries in the array. Your program determines how many entries there are. The output is a two-column list. The first column is the list of the distinct array elements; the second column is the number of occurrences of each element. The list should be sorted on entries in the first column, largest to smallest. Sample output (for input.txt: -12 3 -12 4 1 1 -12 1 -1 1 2 3 4 2 3 -12): Number. Count 4 2 3 3 2 2 1 4 -1 1 -12 4
In: Computer Science
java
Given a sequence of integers as an array, determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the array. Here are the constraints. 1. You must use only arrays. 2. You are not allowed to make copies of the array (use only the one that is passed). 3. Your algorithm running time must be at most O(n 2 ). i.e. You can have only one loop within another. Ideally, you should be able to find a linear running time algorithm. i.e. you can even solve this problem using a single loop. Note: Sequence a0, a1, . . . an is considered to be a strictly increasing if a0 < a1 < . . . < an. Sequence containing only one element is also considered to be strictly increasing. Assuming your method is almostIncreasingSequence, following main method could be used to test your code.
public static void main(String[] args) { int[] a1 = {1, 3, 2, 1}; // false int[] a2 = {1, 3, 2}; // true int[] a3 = {1, 2, 1, 2}; // false int[] a4 = {3, 6, 5, 8, 10, 20, 15}; // false int[] a5 = {1, 1, 2, 3, 4, 4}; // false int[] a6 = {1, 4, 10, 4, 2}; // false int[] a7 = {10, 1, 2, 3, 4, 5}; // true int[] a8 = {1, 1, 1, 2, 3}; // false int[] a9 = {0, -2, 5, 6}; // true int[] a10 = {1, 2, 3, 4, 5, 3, 5, 6}; // false int[] a11 = {40, 50, 60, 10, 20, 30}; // false int[] a12 = {1, 1}; // true int[] a13 = {1, 2, 5, 3, 5}; // true int[] a14 = {1, 2, 5, 5, 5}; // false int[] a15 = {10, 1, 2, 3, 4, 5, 6, 1}; // false int[] a16 = {1, 2, 3, 4, 3, 6}; // true int[] a17 = {1, 2, 3, 4, 99, 5, 6}; // true int[] a18 = {123, -17, -5, 1, 2, 3, 12, 43, 45}; // true int[] a19 = {3, 5, 67, 98, 3}; // true int[] a20 = {1, 1, 1}; // false System.out.println(Arrays.toString(a1) + ": " + (almostIncreasingSequence(a1) == false)); System.out.println(Arrays.toString(a2) + ": " + (almostIncreasingSequence(a2) == true)); System.out.println(Arrays.toString(a3) + ": " + (almostIncreasingSequence(a3) == false)); System.out.println(Arrays.toString(a4) + ": " + (almostIncreasingSequence(a4) == false)); System.out.println(Arrays.toString(a5) + ": " + (almostIncreasingSequence(a5) == false)); System.out.println(Arrays.toString(a6) + ": " + (almostIncreasingSequence(a6) == false)); System.out.println(Arrays.toString(a7) + ": " + (almostIncreasingSequence(a7) == true)); System.out.println(Arrays.toString(a8) + ": " + (almostIncreasingSequence(a8) == false)); System.out.println(Arrays.toString(a9) + ": " + (almostIncreasingSequence(a9) == true)); System.out.println(Arrays.toString(a10) + ": " + 2 (almostIncreasingSequence(a10) == false)); System.out.println(Arrays.toString(a11) + ": " + (almostIncreasingSequence(a11) == false)); System.out.println(Arrays.toString(a12) + ": " + (almostIncreasingSequence(a12) == true)); System.out.println(Arrays.toString(a13) + ": " + (almostIncreasingSequence(a13) == true)); System.out.println(Arrays.toString(a14) + ": " + (almostIncreasingSequence(a14) == false)); System.out.println(Arrays.toString(a15) + ": " + (almostIncreasingSequence(a15) == false)); System.out.println(Arrays.toString(a16) + ": " + (almostIncreasingSequence(a16) == true)); System.out.println(Arrays.toString(a17) + ": " + (almostIncreasingSequence(a17) == true)); System.out.println(Arrays.toString(a18) + ": " + (almostIncreasingSequence(a18) == true)); System.out.println(Arrays.toString(a19) + ": " + (almostIncreasingSequence(a19) == true)); System.out.println(Arrays.toString(a20) + ": " + (almostIncreasingSequence(a20) == false)); }
Output should be the following (Please carefully look at why it prints all true before asking questions). [1, 3, 2, 1]: true [1, 3, 2]: true [1, 2, 1, 2]: true [3, 6, 5, 8, 10, 20, 15]: true [1, 1, 2, 3, 4, 4]: true [1, 4, 10, 4, 2]: true [10, 1, 2, 3, 4, 5]: true [1, 1, 1, 2, 3]: true [0, -2, 5, 6]: true [1, 2, 3, 4, 5, 3, 5, 6]: true [40, 50, 60, 10, 20, 30]: true [1, 1]: true [1, 2, 5, 3, 5]: true [1, 2, 5, 5, 5]: true [10, 1, 2, 3, 4, 5, 6, 1]: true [1, 2, 3, 4, 3, 6]: true [1, 2, 3, 4, 99, 5, 6]: true [123, -17, -5, 1, 2, 3, 12, 43, 45]: true [3, 5, 67, 98, 3]: true [1, 1, 1]: true
In: Computer Science
In the paper by Dunn, G. (1989) Design and analysis of reliability studies, two different examiners (graders) graded papers by each of 29 candidates. The grades ranged from 0 = very poor to 4 = excellent. The grades are recorded in the data set Grade reliability.
Please show and explain all work with excel software and please discuss all 4 parts of the hypothesis test.
Grade reliability Data set:
| Candidate | Examiner A | Examiner B |
| 1 | 1 | 2 |
| 2 | 0 | 0 |
| 3 | 0 | 0 |
| 4 | 2 | 2 |
| 5 | 0 | 0 |
| 6 | 4 | 3 |
| 7 | 0 | 0 |
| 8 | 0 | 0 |
| 9 | 0 | 0 |
| 10 | 2 | 3 |
| 11 | 1 | 2 |
| 12 | 2 | 3 |
| 13 | 0 | 1 |
| 14 | 4 | 3 |
| 15 | 4 | 3 |
| 16 | 1 | 2 |
| 17 | 0 | 2 |
| 18 | 1 | 2 |
| 19 | 2 | 3 |
| 20 | 0 | 0 |
| 21 | 2 | 3 |
| 22 | 4 | 4 |
| 23 | 0 | 0 |
| 24 | 0 | 0 |
| 25 | 4 | 3 |
| 26 | 0 | 2 |
| 27 | 1 | 2 |
| 28 | 3 | 4 |
| 29 | 2 | 3 |
In: Statistics and Probability
On 15 September 2020 you plan to buy a 6% p.a. Treasury bond maturing on 15 September 2026(Note that all the interest rates given in this question are j2 rate)
a. How much would you pay to earn 7% p.a. on your transaction? Ignore taxation considerations.
b How much would you pay to earn a net return of 7% p.a. on your transaction, allowing for tax on interest-only of 30%? In this instance, assume tax on interest is paid immediately.
c. How much would you pay to earn a net return of 7% p.a. on your transaction, allowing for tax on interest and capital gains of 30%? In answering this question, you should assume that the tax on interest and capital gains is deferred by twelve months.
d. Allowing for tax on interest and capital gains of 30%, what would your net annual yield be if you paid $97.447 for the bond? Again, assume that the tax on interest and capital gains is deferred by twelve months.
In: Finance
Net Present Value of Payouts The NPV of a series of values is calculated using a discount rate applied to those values. Apply the NPV function to the series of expected benefit payouts using .075 as the discount rate. You can hard-code the discount rate. How would you calculate this in Excel? Please show calculation and logic used in excel, so I understand. Below are the values:
| Year | Expected Benefit Payouts | |
| 2016 | NA | |
| 2017 | $19,661,882,100.00 | |
| 2018 | $19,909,120,629.23 | |
| 2019 | $20,162,051,346.58 | |
| 2020 | $20,420,680,083.92 | |
| 2021 | $20,685,015,994.25 | |
| 2022 | $20,955,071,470.68 | |
| 2023 | $21,230,862,069.61 | |
| 2024 | $21,512,406,437.74 | |
| 2025 | $21,799,726,242.91 | |
| 2026 | $22,092,846,108.56 | |
| 2027 | $22,391,793,551.78 | |
| 2028 | $22,696,598,924.58 | |
| 2029 | $23,007,295,358.62 | |
| 2030 | $23,323,918,712.87 | |
| 2031 | $23,646,507,524.45 | |
| 2032 | $23,975,102,962.33 | |
| 2033 | $24,309,748,783.82 | |
| 2034 | $24,650,491,293.79 | |
| 2035 | $24,997,379,306.50 | |
| 2036 | $25,350,464,110.00 | |
| 2037 | $25,709,799,432.87 | |
| 2038 | $26,075,441,413.41 | |
| 2039 | $26,447,448,571.04 | |
| 2040 | $26,825,881,779.94 | |
| 2041 | $27,210,804,244.76 | |
| 2042 | $27,602,281,478.45 | |
| 2043 | $28,000,381,281.99 | |
| 2044 | $28,405,173,726.15 | |
| 2045 | $28,816,731,135.01 | |
| 2046 | $29,235,128,071.33 |
In: Finance