java
1.) a method to append a 2d double array at the right of another 2d double array, return a new array.
E.g. numss1: {{1, 2}, {3, 4, 5}, {6}}, numss2: {{7}, {8, 9}}, return {{1, 2, 7}, {3, 4, 5, 8, 9}, {6}}
In: Computer Science
FORECASTING
A major source of revenue in Jacksonville is a county sales tax on certain types of goods and services. For the most recent 4 years (2015 to 2018), quarterly sales tax revenue (in millions of dollars) has been collected. These values are shown in the following table:
|
Year |
Quarter |
Sales Tax Revenue ($1,000,000) |
|
2015 |
1 |
218 |
|
2015 |
2 |
247 |
|
2015 |
3 |
243 |
|
2015 |
4 |
292 |
|
2016 |
1 |
225 |
|
2016 |
2 |
254 |
|
2016 |
3 |
255 |
|
2016 |
4 |
299 |
|
2017 |
1 |
234 |
|
2017 |
2 |
265 |
|
2017 |
3 |
264 |
|
2017 |
4 |
327 |
|
2018 |
1 |
250 |
|
2018 |
2 |
283 |
|
2018 |
3 |
389 |
|
2018 |
4 |
356 |
Use multiple regression to estimate the trend and seasonal components of this time series. Explain the meaning of each estimated coefficient that results from the regression procedure. Then, provide a forecast for each quarter of 2019.
In: Statistics and Probability
Assume a project information is given in the table below:
| Activity | Immediate Processor | Duration (Days) |
|---|---|---|
| A | --- | 5 |
| B | --- | 5 |
| C | --- | 5 |
| D | A, B | 4 |
| E | B | 3 |
| F | C | 8 |
| G | D, E | 6 |
In: Operations Management
A -year study conducted by the American Heart Association provided data on how age, blood pressure, and smoking relate to the risk of strokes. Data from a portion of this study follow. Risk is interpreted as the probability (times 100) that a person will have a stroke over the next 10-year period. For the smoker variable, 1 indicates a smoker and 0 indicates a nonsmoker.
| Risk | Age | Blood Pressure | Smoker | ||
| 10 | 85 | 150 | 1 | ||
| 30 | 68 | 207 | 1 | ||
| 11 | 64 | 104 | 0 | ||
| 61 | 86 | 127 | 0 | ||
| 39 | 70 | 139 | 0 | ||
| 49 | 83 | 155 | 0 | ||
| 7 | 68 | 179 | 1 | ||
| 36 | 84 | 176 | 0 | ||
| 41 | 57 | 169 | 0 | ||
| 25 | 66 | 161 | 1 | ||
| 39 | 69 | 122 | 0 | ||
| 37 | 90 | 101 | 0 | ||
| 26 | 89 | 124 | 0 | ||
| 63 | 81 | 118 | 0 | ||
| 35 | 84 | 181 | 0 | ||
| 33 | 89 | 176 | 0 | ||
| 30 | 66 | 156 | 1 | ||
| 34 | 66 | 164 | 1 | ||
| 15 | 74 | 210 | 1 | ||
| 32 | 76 | 160 | 1 | ||
a. Develop an estimated regression equation that can be used to predict the risk of stroke given the age and blood pressure level. Enter negative value as negative number. Use Table 4 in Appendix B.
| The regression equation is (to 4 decimals) | ||||||||||||||||||||||||
| Risk=_______+________ age+________ blood pressure | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
| Analysis of Variance | ||||||||||||||||||||||||
|
b. Consider adding two independent variables to the model developed in part (a), one for the interaction between age and blood pressure level and the other for whether the person is a smoker. Develop an estimated regression equation using these four independent variables. Enter negative value as negative number. Use Table 4 in Appendix B.
| The regression equation is (to 4 decimals) | ||||||||||||||||||||||||
| Risk=______+______ age+_______ blood pressure | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
| Analysis of Variance | ||||||||||||||||||||||||
|
c. At a level of significance, test to see whether the addition of the interaction term and the smoker variable contribute significantly to the estimated regression equation developed in part (a). Use Table 4 in Appendix B.
What is the value of the F test statistic?
(to 2 decimals)
P-value is - Select your answer -lower than 0.01between 0.01 and 0.025between 0.025 and 0.05between 0.05 and 0.10greater than 0.10Item 36 , so the addition of the two independent variables - Select your answer -is not is 37 statistically significant.
In: Statistics and Probability
Write a C++ program to allow the user to:
1. Create two classes. Employee and Departments.
The Department class will have: DepartmentID, Departmentname,
DepartmentHeadName.
The Employee class will have employeeID, emploeename,
employeesalary, employeeage, employeeDepartmentID.
Both of the above classes should have appropriate constructors, accessor methods.
2. Create two arrays . One for Employee with the size 5 and
another one for Department with the size 3.
Your program should display a menu for the user to do the
following:
1. Create Department. Collect all information about a department. Make sure the department ID does not already exist in the array containing Department objects. If it does not, then insert the Department object into the array. When the array is full, display the error message to the user "The array is full, you can not add any more departments"
2. Create Employee. Collect all information about an Employee.
Make sure the Employee ID does not already exist in the array
containing Employee objects. If it does not, then insert the
Employee object into the array. Also make sure that the
DepartmentID that the employee belongs also exists. If it does not,
then display error message.
When the array is full, display the error message to the user "The
array is full, you can not add any more Employees"
3. Write the data to the file. When the user selects this option, dump the information in each array into a separate file.
4. Retrieve data from file. When user selects this option, open each file, load the data from the file into the appropriate array.
5. Display Report: When user selects this option, go through arrays and display the total salary paid for each department. The report should display the department name and the total salary of all employees in that department.
Test Case
TEST CASE1: 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 Please Enter Department Details: Department ID : 1 Department Name : Sales Head of Department : Anna 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 Please Enter Department Details: Department ID : 1 Value must be unique! 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 Please Enter Department Details: Department ID : 2 Department Name : Marketing Head of Department : Mark 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 Please Enter Department Details: Department ID : 3 Department Name : GlobalSales Head of Department : Patil 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 The array is full, you can not add any more Departments. 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 1 Employee Name :John Salary: $45000 Age : 25 Department ID : 1 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 1 Value must be unique! 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 The array is full, you can not add any more Departments. 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 2 Employee Name :Susan Salary: $45000 Age : 26 Department ID : 1 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 3 Employee Name :Adam Salary: $50000 Age : 24 Department ID : 2 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 4 Employee Name :Manny Salary: $60000 Age : 26 Department ID : 2 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 5 Employee Name :Maria Salary: $60000 Age : 23 Department ID : 9 Please enter a valid department ID: 3 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 The array is full, you can not add any more Employees. 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 5 Salary Report By Department Dept : Sales Total Salary : $90000 Dept : Marketing Total Salary : $110000 Dept : GlobalSales Total Salary : $60000 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 9 Please enter a valid choice (1 - 6): 3 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 6 Thank you, goodbye. TEST CASE 2: 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 Please Enter Department Details: Department ID : 1 Department Name : Sales Head of Department : Markus 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 Please Enter Department Details: Department ID : 1 Value must be unique! 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 1 Please Enter Department Details: Department ID : 2 Department Name : Marketing Head of Department : Anna 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 1 Employee Name :John Salary: $45000 Age : 23 Department ID : 1 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 2 Employee Name :Susan Salary: $40000 Age : 45 Department ID : 1 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 2 Please Enter Employee Details: Employee ID : 3 Employee Name :many Salary: $70000 Age : 34 Department ID : 2 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 5 Salary Report By Department Dept : Sales Total Salary : $85000 Dept : Marketing Total Salary : $70000 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 3 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 4 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 5 Salary Report By Department Dept : Sales Total Salary : $85000 Dept : Marketing Total Salary : $70000 1. Create Department 2. Create Employee 3. Write Out Data File 4. Read In Data File 5. Display Salary Report 6. -- Quit -- Please make a selection : 6 Thank you, goodbye.
In: Computer Science
. Consider a firm that has a production function y = f(x1, x2) =
2x 1/4 1 x 1/4 2 facing input prices w1 = 2
and w2 = 4. Assume that the output price p = 8.
• What will be the profit maximizing output level?
-What will be the profit? •
-If this firm is divided up into two equal-size smaller firms, what
would happen to its overall profits? Why
In: Economics
In: Advanced Math
An experiment was conducted to study growth characteristics of 8 different provenances (regions of natural occurrence) of Gmelina arborea (a tree native to southern Asia). There are three plots available for planting, so one tree of each provenance is planted in each plot. The response variable is the diameter of each tree (in centimeters) at breast height (1.4 meters above ground).
What type of design is being used in this experiment?
Perform the appropriate analysis to evaluate the differences in mean diameter at breast height of the eight provenances.
Which provenance(s), if any, has (have) largest mean diameter at breast height?
Comment on the effectiveness of the design in increasing the efficiency of the experiment.
| Provenance | Plot | Diameter |
| 1 | 1 | 30.85 |
| 1 | 2 | 38.01 |
| 1 | 3 | 35.1 |
| 2 | 1 | 30.24 |
| 2 | 2 | 28.43 |
| 2 | 3 | 35.93 |
| 3 | 1 | 30.94 |
| 3 | 2 | 31.64 |
| 3 | 3 | 34.95 |
| 4 | 1 | 29.89 |
| 4 | 2 | 29.12 |
| 4 | 3 | 36.75 |
| 5 | 1 | 21.52 |
| 5 | 2 | 24.07 |
| 5 | 3 | 20.76 |
| 6 | 1 | 25.38 |
| 6 | 2 | 32.14 |
| 6 | 3 | 32.19 |
| 7 | 1 | 22.89 |
| 7 | 2 | 19.66 |
| 7 | 3 | 26.92 |
| 8 | 1 | 29.44 |
| 8 | 2 | 24.95 |
| 8 | 3 | 37.99 |
In: Statistics and Probability
Problem: Susan Sound predicts that students will learn most
effectively with a constant background sound, as opposed to an
unpredictable sound or no sound at all. She randomly divides
twenty-four students into three groups of eight. All students study
a passage of text for 30 minutes. Those in group 1 study with
background sound at a constant volume in the background. Those in
group 2 study with noise that changes volume periodically. Those in
group 3 study with no sound at all. After studying, all students
take a 10 point multiple choice test over the material. Their
scores follow:
group test scores
1) constant sound 7 4 6 8 6 6 2 9
2) random sound 5 5 3 4 4 7 2 2
3) no sound 2 4 7 1 2 1 5 5
Please give me step by step how to answer the question.
In: Statistics and Probability
House Prices:
Notes on variables:
Price: In thousands of dollars
Ac: air conditioner (1 if yes, 0 if no)
Size: In square feet
Age: In years
Pool: (1 if yes, 0 if no)
Bedrms: Number of Bedrooms
Baths: Number of Bathrooms
4) a. Make a Scatter plot where x=size and y=price
b. Calculate the Least Squares Regression (LSR) equation:
c. Does the intercept make sense? Why or why not?
c. Find and interpret the R2
d. Predict the average price of a home that is 1000 square feet.
e. Better interpretation of the slope: If the square footage increased by 40 square feet, then how more would you expect the house to cost?
f. Plot the residuals vs. X-values.
g. Use the residuals plot or the regression line to identify any outliers. (If there are any.)
5) Looking at Heights again. Remember women have a mean height m= 65 in. and a standard deviation s =2.5 in. and men have a mean height of m=70 and a standard deviation s= 3
a. What proportion of women are taller than 69 in?
b. What height for men is the 65th percentile (larger than 65% of the data)?
c. What proportion/percentage of men have height between 68 to 75?
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Statistics and Probability