For the data set shown below
x y
20 98
30 95
40 91
50 83
60 70
(a) Use technology to find the estimates of β0 and β1.
β0 ≈b0=114.60
(Round to two decimal places as needed.)
β1≈b1=−0.68
(Round to two decimal places as needed.)
(b) Use technology to compute the standard error, the point estimate for σ.
se=3.7771
(Round to four decimal places as needed.)
(c) Assuming the residuals are normally distributed, use technology to determine sb1.
sb1equals=0.1194
(Round to four decimal places as needed.)
(d) Assuming the residuals are normally distributed, test H0: β1=0 versus H1: β1≠0 at the α=0.05 level of significance. Use the P-value approach.
Determine the P-value for this hypothesis test.
P-value=__?__
(Round to three decimal places as needed.)
In: Statistics and Probability
Campaign Printing has two service departments, S1 and S2, and two production departments, P1 and P2.
The data for May were as follows:
|
Services provided to: |
|||||
|
Activity |
Pre-allocation Costs |
S1 |
S2 |
P1 |
P2 |
|
S1 |
$90,000 |
10% |
40% |
50% |
|
|
S2 |
$60,000 |
20% |
55% |
25% |
|
|
Pre-allocation Costs |
|||||
|
P1 |
$360,000 |
||||
|
P2 |
$520,000 |
||||
Required:
Allocate service departments costs (S1 & S2) to the production departments (P1 & P2) using reciprocal method
In: Accounting
P1
Consider an array of length n that contains unique integers between 1 and n+1. For example, an array A1 of length 5 might contain the integers 3, 6, 5, 1, and 4. In an array of this form, one number between 1 and n+1 will be missing. In A1, the integer 2 is missing from the array. As another example, consider the array A2 that contain the integers 4, 7, 5, 2, 6, and 1. A2 has size 6, contains integers in the range of 1 to 7. In A2, the integer 3 is missing from this array.
Write a Java method
static int findMissing(int [] a)
that reads the array and returns the number not present in the array. The running time of the algorithm should be O(n).
For A1=[3,6,5,1,4], findMissing(A1) returns 2. For A2=[4,7,5,2,6,1], findMissing(A2) returns 3.
Hint: Use the formula: 1 + 2 + 3 + …+ n = n(n+1)/2
P2
You can sort a large array of m integers that are in the range 1 to n by using an array count of n entries to count the number of occurrences of each integer in the array. For example, consider the following array A of 14 integers that are in the range from 1 to 9 (note that in this case m = 14 and n = 9):
9 2 4 8 9 4 3 2 8 1 2 7 2 5
Form an array count of 9 elements such that count[i-1] contains the number of times that i occurs in the array to be sorted. Thus, count is
1 4 1 2 1 0 1 2 2
In particular, count[0] = 1 since 1 occurs once in A. count[1] = 4 since 2 occurs 4 times in A. count[2]=1 since 3 occurs once in A. count[3] =2 since 4 occurs 2 times in A.
Use the count array to sort the original array A. Implement this sorting algorithm in the function
public static void countingSort(int[] a, int n )
and analyze its worst case running time in terms of m (the length of array a) and n.
After calling countingSort(), a must be a sorted array (do not store sorting result in a temporary array).
P3
The median of a collection of values is the middle value. One way to find the median is to sort the data and take the value at the center. But sorting does more than necessary to find the median. You need to find only the kth smallest entry in the collection for an appropriate value of k. To find the median of n items, you would take k as n/2 rounded up
You can use the partitioning strategy of quick sort to find the kth smallest entry in an array. After choosing a pivot and forming the subarrays Smaller and Larger, you can draw one of the following conclusions:
If Smaller contains k or more entries, it must contain the kth smallest entry
If Smaller contains k-1 entries, the kth smallest entry is the pivot.
If Smaller contains fewer than k-1 entries, the kth smallest entry is in Larger.
Implement the recursive method
public satic int findKSmallest(int[] a, int k)
that finds the kth smallest entry in an unsorted array a.
Use the method findKSmallest to implement the method
public static int findMedian(int[] a)
that finds the median in an array a.
------------------------------------------------------------------------------------------------
//The code below is given need to add methods here:
public class ArraySort
{
public static <T extends Comparable<? super T>>
void mergeSort(T[] a, int n) {
mergeSort(a, 0, n - 1);
}
public static <T extends Comparable<? super T>>
void mergeSort(T[] a, int first, int last) {
@SuppressWarnings("unchecked")
T[] tempArray = (T[])new Comparable<?>[a.length];
mergeSort(a, tempArray, first, last);
}
private static <T extends Comparable<? super T>>
void mergeSort(T[] a, T[] tempArray, int first, int last)
{
if (first < last) { // sort each half
int mid = (first + last) / 2;// index of midpoint
mergeSort(a, first, mid); // sort left half array[first..mid]
mergeSort(a, mid + 1, last); // sort right half array[mid+1..last]
if (a[mid].compareTo(a[mid + 1]) > 0)
merge(a, tempArray, first, mid, last); // merge the two halves
// else skip merge step
}
}
private static <T extends Comparable<? super T>>
void merge(T[] a, T[] tempArray, int first, int mid, int last)
{
// Two adjacent subarrays are a[beginHalf1..endHalf1] and a[beginHalf2..endHalf2].
int beginHalf1 = first;
int endHalf1 = mid;
int beginHalf2 = mid + 1;
int endHalf2 = last;
// while both subarrays are not empty, copy the
// smaller item into the temporary array
int index = beginHalf1; // next available location in
// tempArray
for (; (beginHalf1 <= endHalf1) && (beginHalf2 <= endHalf2); index++) {
if (a[beginHalf1].compareTo(a[beginHalf2]) < 0) {
tempArray[index] = a[beginHalf1];
beginHalf1++;
}
else {
tempArray[index] = a[beginHalf2];
beginHalf2++;
}
}
// finish off the nonempty subarray
// finish off the first subarray, if necessary
for (; beginHalf1 <= endHalf1; beginHalf1++, index++)
tempArray[index] = a[beginHalf1];
// finish off the second subarray, if necessary
for (; beginHalf2 <= endHalf2; beginHalf2++, index++)
tempArray[index] = a[beginHalf2];
// copy the result back into the original array
for (index = first; index <= last; index++)
a[index] = tempArray[index];
}
// Quick Sort
// Median-of-three privot selection
// Sort by comparison
private static <T extends Comparable<? super T>>
void sortFirstMiddleLast(T[] a, int first, int mid, int last)
{
// Note similarity to bubble sort
order(a, first, mid); // make a[first] <= a[mid]
order(a, mid, last); // make a[mid] <= a[last]
order(a, first, mid); // make a[first] <= a[mid]
}
private static <T extends Comparable<? super T>>
void order(T[] a, int i, int j)
{
if (a[i].compareTo(a[j]) > 0)
swap(a, i, j);
}
private static void swap(Object[] array, int i, int j)
{
Object temp = array[i];
array[i] = array[j];
array[j] = temp;
}
// Partitioning
private static <T extends Comparable<? super T>>
int partition(T[] a, int first, int last)
{
int mid = (first + last)/2;
sortFirstMiddleLast(a, first, mid, last);
// move pivot to next-to-last position in array
swap(a, mid, last - 1);
int pivotIndex = last - 1;
T pivot = a[pivotIndex];
// determine subarrays Smaller = a[first..endSmaller]
// and Larger = a[endSmaller+1..last-1]
// such that entries in Smaller are <= pivot and
// entries in Larger are >= pivot; initially, these subarrays are empty
int indexFromLeft = first + 1;
int indexFromRight = last - 2;
boolean done = false;
while (!done) {
// starting at beginning of array, leave entries that are < pivot;
// locate first entry that is >= pivot; you will find one,
// since last entry is >= pivot
while (a[indexFromLeft].compareTo(pivot) < 0)
indexFromLeft++;
// starting at end of array, leave entries that are > pivot;
// locate first entry that is <= pivot; you will find one,
// since first entry is <= pivot
while (a[indexFromRight].compareTo(pivot) > 0)
indexFromRight--;
if (indexFromLeft < indexFromRight)
{
swap(a, indexFromLeft, indexFromRight);
indexFromLeft++;
indexFromRight--;
}
else
done = true;
} // end while
// place pivot between Smaller and Larger subarrays
swap(a, pivotIndex, indexFromLeft);
pivotIndex = indexFromLeft;
return pivotIndex;
}
public static <T extends Comparable<? super T>>
void quickSort(T[] a, int n) {
quickSort(a, 0, n - 1);
}
public static <T extends Comparable<? super T>>
void quickSort(T[] a, int first, int last) {
// perform recursive step if 2 or more elements
if(first < last) {
// create the partition: Smaller | Pivot | Larger
int pivotIndex = partition(a, first, last);
// sort subarrays Smaller and Larger
quickSort(a, first, pivotIndex - 1);
quickSort(a, pivotIndex + 1, last);
}
}
}
In: Computer Science
1)The life in hours of a battery is known to be approximately normally distributed, with standard deviation 1.25 hours. A random sample of 10 batteries has a mean life of 40.5 hours. A. Is there evidence to support the claim that battery life exceeds 40 hours ? Use α= 0.05.
B. What is the P-value for the test in part A?
C. What is the β-error for the test in part A if the true mean life is 42 hours?
D. What sample size would be required to ensure that doesnot exceed 0.10 if the true mean life is 44 hours?
2) To study the elastic properties of a material manufactured by two methods, the deflection in mm of 2x15 elastic bars made from the two materials are measured, and the are shown in the table:
|
Method 1 |
Method 2 |
|
206 |
177 |
|
188 |
197 |
|
205 |
206 |
|
187 |
201 |
|
194 |
180 |
|
193 |
176 |
|
207 |
185 |
|
185 |
200 |
|
189 |
197 |
|
213 |
192 |
|
192 |
198 |
|
210 |
188 |
|
194 |
189 |
|
178 |
203 |
|
205 |
192 |
A) Construct Relative Frequency Plots for the two sets of data, use 6 bins of increment of 10 starting from 170mm, and then create a Cumulative Distributions of the two data sets. By comparing the slopes of the cumulative distributions, do you think these plots provide support of the assumptions of normality and equal variances for the populations of the two sets?
B) Assuming equal variances of population, do the data support the claim that the mean deflection from method 2 exceeds that from method 1? Use α= 0.05
C) Resolve part B assuming that the variances of populations are not equal.
D)Suppose that if the mean deflection from method 2 exceeds that of method 1 by as much as 5mm, it is important to detect this difference with probability at least 0.90. Is the choice of n1=n2=15 in part A of this problem adequate
E) Make a test that can be used to tell which data set is more accurate than the other (whether method 1 is more accurate or from method two) .
In: Statistics and Probability
Paul is considering investing in a portfolio with two assets a and b. The following is his prediction about future return of a and b in the next year:
probability Asset a. Asset b
20% 12% 15%
30% 10% 12.5%
40% 7.5% 8%
10%. 5%. 4.5%
a. Calculate the expected return and standard deviation of asset a and b
b. If Paul is going to invest 40% of his wealth on asset a and the remaining to asset b, what are the expected return and standard deviation of the portfolio?
c. If the risk-free rate in the market is 1.25% and market return is 8.75%. Calculate required return of the portfolio based on camp. Should Paul invest in this portfolio or not? Why?
In: Finance
Write a C++ function that receives an integer array along with its specified length. The function will replace only one of the smallest integers and one of the largest integers by 0. Then the function will return the average for the rest of the values in the array.
Test case array: 3, 8, 2, 6, 5, 3, 4, 7, 8, 2, 10, 7
Function should return: 5.3
In: Computer Science
Rapp Company is considering switching to an activity-based costing (ABC) system. The company produces and sells two products: LoEnd and HiEnd. The company consists of two departments: Production (where the products are made) and Marketing (which engages in selling and admin activity). The company's traditional costing system computes unit product costs as dictated by GAAP; direct labor hours (DLHs) are used as the allocation base for manufacturing overhead cost (the overhead rate is rounded to the nearest cent). The ABC system will include in unit costs all costs easily associated with units. In addition, in the ABC system, there are four major indirect activities: Machine Setups, Special Processing, General Factory, and Customer Relation (10% of Customer Relation cost relates to manufacturing and is incurred in the Production Department; the rest of the Customer Relation cost is incurred in the Marketing Department). In the ABC system, Customer Relation costs will be associated with customers; the rest of the costs will be associated with units of the two products Price Dm DLH Units Hourly Wage-DL Shipping Cost Hi end 200 72 2 5000 $20 $3 Low end 150 44 1 6000 $20 $1 OH Cost Low High total Machine Setup #of setups 360,000 40 120 160 Special Processing MH 300,000 8000 12000 20000 General Factory(Excluding customer relations) DLH's 144000 ? Customer Relations # of customers 200,000 5 What is the difference between the HiEnd product's unit costs computed by the traditional and ABC systems?
In: Accounting
Hello,
Please give me step by step solution (screenshot) on how to use
the SPSS to solve the following:
To examine the work environment on attitude toward work, an
industrial hygienist randomly assigns a group of 18 recently hired
sales trainees to three "home rooms" - 6 trainees per room. Each
room is identical except for wall color. One is light green,
another is light blue, and the third is a deep red. During the
week-long training program, the trainees stay mainly in their
respective home rooms. At the end of the program, an attitude scale
is used to measure each trainer's attitude toward work (a low score
indicates a poor attitude and a high score a good attitude). On the
basis of these data, the industrial hygenist wants to determine
whether there is significant evidence that work environment (i.e.,
color of room) has an effect on attitude toward work, and if so,
which room color(s) appear to significantly enhance attitude using
the SPSS ANOVA test.
Here is the data:
Light Green Light Blue Deep Red
46 59 34
51 54 29
48 47 43
42 55 40
58 49 45
50 44 34
What is your conclusion?
In: Statistics and Probability
Choose three companies (from these industries) from S&P 500 or Dow Jones Industrial Average; Build a portfolio of 100 shares distributed among the three companies you have chosen. Record the purchase prices and your total investment in dollars. This is the cost of your investment. Then follow your two investments, one a portfolio of stocks of the three companies you have chosen and the other an investment in the index you have chosen, over a period of two weeks. Make two readings per week with a spacing of two days between the two recordings and record the price movements, recording your losses and gains. Provide any economic insights that affect your portfolio and your index. This means that you must follow the business and economic news closely. Make the weekly observations on the same days. For example, if you choose Monday and Thursday or Tuesday and Friday as the days, then continue to make your recordings every Monday and Thursday or every Tuesday and Friday. Please record the dates the observations are made.
Index: S&P 500
(1) Disney Corporation; ticker symbol: DIS
(2) General Mills Inc.; ticker symbol: GIS
(3) Wal-Mat; ticker symbol: WMT
(4) Anheuser-Busch Companies; ticker symbol: BUD (5) Comcast
Corporation; ticker symbol: CMCSA
(6) International Business Machines: IBM
(7) Boeing Company: BA
(8) Tyson Foods, Inc: TSN
(9) John and Johnson, Inc: JNJ
(10) P&G Co: PG
Index: Dow Jones Industrial Average
(1) Bank of America; ticker symbol: BAC
(2) International Business Machines; ticker symbol: IBM (3)
AT&T; ticker symbol: ATT
(4) Merck; ticker symbol: MRK
(5) Caterpillar; ticker symbol: CAT
(6) McDonalds; ticker symbol: MCD
(7) Coca-Cola; ticker symbol: CCE
(8) Exxon Mobil; ticker symbol: XOM
(9) General Electric; ticker symbol: GE
(10) Microsoft; ticker symbol: MSFT
THANK YOU SO MUCH, I REALLY APPRECIATE YOUR HELP :)
In: Finance
In 2017, 965 students registered for a course. Explain how you will
use the random number table to select a simple random sample of 20
students.
Start from digit one of row 6.
Fill in the blanks
1. Bar chart is normally used for ___________ data.
2. Pie chart presents ___________ data.
3. A ____________________ is used to describe the relationship
between two categorical variables.
4. A ___________ histogram is one with a single peak.
5. A ___________ histogram is one with two peaks.
6. Observations measured at the same point in time across
individual units are called _______________ data.
7. Observations measured at successive points in time on a single
unit are called _______________ data.
In: Math