4. Bayes Theorem - One way of thinking about Bayes theorem is that it converts a-priori probability to a-posteriori probability meaning that the probability of an event gets changed based upon actual observation or upon experimental data. Suppose you know that there are two plants that produce helicopter doors: Plant 1 produces 1000 helicopter doors per day and Plant 2 produces 4000 helicopter doors per day. The overall percentage of defective helicopter doors is 0.01%, and of all defective helicopter doors, it is observed that 50% come from Plant 1 and 50% come from Plant 2. [8 points]
(i) The a-priori probability of defective helicopter doors produced by Plant 1 is:
a. 0.0001
b. 0.5
c. 0.002
d. 0.0001 * 0.5
(ii) Probability of helicopter doors produced by Plant 1:
a. 0.5
b. 0.002
c. 0.4
d. 0.2
(iii) Probability of a helicopter door produced by Plant 1 given that the door is defective is:
a. 0.0001
b. 0.5
c. 0.002
d. 0.2 * 0.0001
In: Computer Science
1.Three goods are produced and consumed in an economy during years 1 and 2. The table shows prices (P1 and P2) for each good and the quantities produced (Q1 and Q2) for each good. The base year is year 1. Good P1 Q1 P2 Q2 Milk (gallons) $4.10 40 $4.20 50 Beef (pounds) $1.90 20 $2.20 25 Carrots (bags) $4.50 10 $4.80 15 Enter numbers rounded to two decimal places in each blank.
Real GDP in year 1 is $ . Real GDP in year 2 is $ .
2.
A country has nominal GDP equal to $216.18 billion in 2018. The GDP deflator in 2018 has a value of 110.42. What was the value of real GDP, in billions of dollars.
Round to two decimal places. If your answer is 3.2 billion then just enter 3.2.
In: Economics
1. What dividend yield would be reported in two years in the financial press for a stock that currently pays a $1.50 dividend per quarter, has a return on equity of 18% and earnings per share of $7.75 and a projected stock price in two years of $40?
A. 15%. B. 16.5% C. 16.2% D. 4%.
2. Allen Co. has the following data for 2017, Sales of $50 million, Net Profit Margin of 10%, an- nual Depreciation of $1.5 million, projected Capital Expenditures of $1 million, projected Working Capital investment of $1.1 million and an inflation rate of 3%? The firm has no debt and you are an analyst preparing a five-year free cash flow pro forma and the free cash flow in year 2019 of the pro forma is?
A. $4.532 million. B. $4.667 million. C. $ 2.90 million. D. $3.07 million.
In: Finance
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
Write a c program
Write a function to swap two elements of an integer array. Call the
function to swap the first element, i[0] with last element i[n],
second element i[1] with the last but one element i[n-1] and so on.
Should handle arrays with even and odd number of elements.
Call the swap function with the following arrays and print results in each case before and after swapping.
i. int arr1[] = {0, 1, 2, 3, 30, 20, 10, -1};
ii. int arr2[] = {11, 12, 13, 14, 15};
In: Computer Science
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
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