Lester Hollar is vice president for human resources for a large manufacturing company. In recent years, he has noticed an increase in absenteeism, which he thinks is related to the general health of the employees. Four years ago, in an attempt to improve the situation, he began a fitness program in which employees exercise during their lunch hour. To evaluate the program, he selected a random sample of eight participants and found the number of days each was absent in the six months before the exercise program began and in the last six months. Below are the results.
| Employee | Before | After |
| 1 | 1 | 3 |
| 2 | 1 | 1 |
| 3 | 2 | 2 |
| 4 | 3 | 3 |
| 5 | 1 | 3 |
| 6 | 4 | 2 |
| 7 | 2 | 2 |
| 8 | 5 | 2 |
At the .05 significance level, can he conclude that the number of absences has declined? Estimate the p-value.
a. State the decision rule for 0.02 significance level: H0 : μd≤ 0; H1 : μd > 0. (Round the final answer to 3 decimal places.)
Reject H0 if t > .
b. Compute the value of the test statistic. (Round the final answer to 3 decimal places.)
Value of the test statistic
c. Estimate the p-value? (Round the final answer to 4 decimal places.)
d. What is your decision regarding H0?
At the 0.05 significance level, (Click to select) reject do not reject H0.
In: Statistics and Probability
Imagine you have a rotary combination lock with many dials. Each dial has the digits 0 - 9. At any point in time, one digit from each dial is visible.
Each dial can be rotated up or down. For some dial, if a 4 is currently visible then rotating the dial up would make 5 visible; rotating the dial down would make 3 visible. When 0 is the visible digit then rotating down would make 9 visible. Similarly, when 9 is visible then rotating up would make 0 visible.
We have devised a robotic finger to manipulate such combination systems. The robotic finger takes as input a String that indicates the operations to be performed. An L moves the finger one dial to the left, an R moves the finger one dial to the right, and a + rotates the dial that the finger is at up and a - rotates the dial that the finger is at down.
The robotic finger always starts at the leftmost dial.
Task 1: Basic Operations
Valid Sequence
Given a String that consists of (only) the characters L, R, + and -, determine if this String represents a valid sequence of operations.
A valid sequence of operations would not move the finger to the left of the leftmost dial or to the right of the rightmost dial.
public boolean validOperation(String ops, int numDials) {
Rotations
Given a sequence of operations in String form, as well as an initial arrangement of the dials, determine the digits that will be visible after the operations have been performed.
public int[] rotate(int[] initialState, String ops) {
Task 2: Finding Rotation Sequences
Given an initial state of the dials and a final state, return a String that represents a sequence of operations of shortest length that transforms the initial state to the final state.
public String getRotationSequence(int[] initialState, int[] newState) {
TEST CASE
@Test
public void testValidOp1() {
RoboticFinger rf = new RoboticFinger();
assertTrue(rf.validOperation("R++L++-RRR", 4));
}
@Test
public void testValidOp2() {
RoboticFinger rf = new RoboticFinger();
assertTrue(!rf.validOperation("R++L++-RRR", 3));
}
@Test
public void testValidOp3() {
RoboticFinger rf = new RoboticFinger();
assertTrue(!rf.validOperation("L-+R++RR", 10));
}
@Test
public void testValidOp4() {
RoboticFinger rf = new RoboticFinger();
assertTrue(!rf.validOperation("RRR+-R+R+LL", 4));
}
@Test
public void testValidOp5() {
RoboticFinger rf = new RoboticFinger();
assertTrue(rf.validOperation("RRR+-R+R+LL", 6));
}
@Test
public void testRotate1() {
RoboticFinger rf = new RoboticFinger();
int[] initialState = {1, 2, 4, 4, 5};
String ops = "R++R-";
int[] expectedState = {1, 4, 3, 4, 5};
assertArrayEquals(expectedState, rf.rotate(initialState, ops));
}
@Test
public void testRotate2() {
RoboticFinger rf = new RoboticFinger();
int[] initialState = {1, 2, 4, 4, 5};
String ops = "R++R-R-L++";
int[] expectedState = {1, 4, 5, 3, 5};
assertArrayEquals(expectedState, rf.rotate(initialState, ops));
}
@Test
public void testRotate3() {
RoboticFinger rf = new RoboticFinger();
int[] initialState = {7, 0, 2, 9, 1, 5, 6};
String ops = "R-R++R+++R+RR--";
int[] expectedState = {7, 9, 4, 2, 2, 5, 4};
assertArrayEquals(expectedState, rf.rotate(initialState, ops));
}
@Test
public void testGetRotationSequence1() {
RoboticFinger rf = new RoboticFinger();
int[] initialState = {1, 2, 4, 4, 4, 7};
int[] finalState = {2, 7, 3, 4, 8, 9};
int expectedLength = "+R+++++R-RR++++R++".length();
String ops = rf.getRotationSequence(initialState, finalState);
assertArrayEquals(finalState, rf.rotate(initialState, ops));
assertEquals(expectedLength, ops.length());
}
@Test
public void testGetRotationSequence2() {
RoboticFinger rf = new RoboticFinger();
int[] initialState = {9, 9, 9, 9, 9, 9, 1};
int[] finalState = {2, 7, 3, 4, 8, 9, 2};
int expectedLength = 22;
String ops = rf.getRotationSequence(initialState, finalState);
assertArrayEquals(finalState, rf.rotate(initialState, ops));
assertEquals(expectedLength, ops.length());
}
@Test
public void testGetRotationSequence3() {
RoboticFinger rf = new RoboticFinger();
int[] initialState = {5};
int[] finalState = {7};
int expectedLength = 2;
String ops = rf.getRotationSequence(initialState, finalState);
assertArrayEquals(finalState, rf.rotate(initialState, ops));
assertEquals(expectedLength, ops.length());
}In: Computer Science
use the method of undetermined cofficients to find the the general solution of the following differential equations. verify your solution by using dsolve in matlab.
1) y'' + 4y' + 3y =x + 1
2) y" + 2y' +2y = 2x^2 + 2x + 4
In: Advanced Math
Please show in EXCEL how to express with function formula.
As we discussed during Week 3, researchers decide to ask 4 tie-purchasing customers whether they bought a bow tie or normal tie. According to national data, 3% of all ties purchased are bow ties.
Not surprisingly, this problem can be easily framed as a Binomial Distribution problem, as it meets all of the conditions outlined in our Week 4 (Monday) class. Further, we can identify the purchase of a bow tie with fixed probability of .03 as a success; the purchase of a standard tie with fixed probability of .97 as a failure. In other words:
p = .03, q=(1-p) = .97, n=4.
Hint: For P(X=0), enter the following:
“=COMBIN(4,0)*POWER(0.03,0)*POWER(1-0.03,4-0)” or
=COMBIN(4,0)*.03^0* (1-.03)^(4-0)”
(Note: for this problem, and all others in this Exercise, please round the numbers to 4 digits using Excel. You can do this after the fact from the toolbar, as we’ve shown before in class.)
Finally, in cell A46, use the SUM function to sum the individual probabilities you’ve computed in (a).
Then, in cell A49, compute the probability that at least one of the four persons purchased a bow tie by taking the complement of the event, X = 0. (Note: again, do not type in any specific values. Reference the relevant cells from the values you’ve already computed.) Round to 4 digits. In cell B49, type in “1-P(X=0)”.
Then, in cells, C40, C41, …, C44 type in “x=0, x=1, x=2, x=3, x=4”, respectively.
In cell E46, reference via an “=” sign the appropriate cell that identifies the probability that fewer than 2 persons purchased a bow tie. In cell F46 type in “P(X≤1)”.
As we discussed during Week 3, researchers decide to ask 4 tie-purchasing customers whether they bought a bow tie or normal tie. According to national data, 3% of all ties purchased are bow ties.
Not surprisingly, this problem can be easily framed as a Binomial Distribution problem, as it meets all of the conditions outlined in our Week 4 (Monday) class. Further, we can identify the purchase of a bow tie with fixed probability of .03 as a success; the purchase of a standard tie with fixed probability of .97 as a failure. In other words:
p = .03, q=(1-p) = .97, n=4.
Hint: For P(X=0), enter the following:
“=COMBIN(4,0)*POWER(0.03,0)*POWER(1-0.03,4-0)” or
=COMBIN(4,0)*.03^0* (1-.03)^(4-0)”
(Note: for this problem, and all others in this Exercise, please round the numbers to 4 digits using Excel. You can do this after the fact from the toolbar, as we’ve shown before in class.)
Finally, in cell A46, use the SUM function to sum the individual probabilities you’ve computed in (a).
Then, in cell A49, compute the probability that at least one of the four persons purchased a bow tie by taking the complement of the event, X = 0. (Note: again, do not type in any specific values. Reference the relevant cells from the values you’ve already computed.) Round to 4 digits. In cell B49, type in “1-P(X=0)”.
Then, in cells, C40, C41, …, C44 type in “x=0, x=1, x=2, x=3, x=4”, respectively.
In cell E46, reference via an “=” sign the appropriate cell that identifies the probability that fewer than 2 persons purchased a bow tie. In cell F46 type in “P(X≤1)”.
In: Math
1. a) You’re a marketing analyst for Hasbro Toys. You get the following data:
|
Ad Expenditure ($100) |
Sales Revenue ($1,000) |
|
1 |
1 |
|
2 |
1 |
|
3 |
2 |
|
4 |
2 |
|
5 |
4 |
Compute and interpret the sample correlation coefficient between advertising expenditure and sales revenue.
b) An experiment results in one of the following sample points: E1, E2, E3, E4, or E5.
Find P(E3) if P(E1) = 2P(E3), P(E2)= 0.1, P(E4) =0 .2 and P(E5) = 0.1
c) For each of the random variables defined below, what values may each of the random variables X assume?
(i) (1 point) X=the number of newspapers sold by the New York Times each month
(ii) (1 point) X= amount of ink used in printing the Sunday edition of the New York Times.
In: Statistics and Probability
The following represents a project that should be scheduled using CPM:
| IMMEDIATE PREDECESSORS | TIMES (DAYS) | |||
| ACTIVITY | a | m | b | |
| A | — | 1 | 4 | 7 |
| B | — | 1 | 3 | 5 |
| C | A | 2 | 5 | 11 |
| D | A | 1 | 8 | 9 |
| E | B | 1 | 2 | 3 |
| F | C,D | 1 | 6 | 11 |
| G | D,E | 1 | 2 | 3 |
| H | F,G | 2 | 3 | 3 |
b. What is the critical path?
| B-E-G-H | |
| A-C-F-H | |
| A-D-F-H | |
| A-D-G-H |
c. What is the expected project completion time? (Round your answer to 3 decimal places.)
Project completion time days
d. What is the probability of completing this project within 22 days? (Do not round intermediate calculations. Round your answer to 4 decimal places.)
Probability
In: Operations Management
The joint pdf of a two continuous random variables is given as follows: ??,? (?, ?) = { ??? 0 < ? < 2, 0 < ? < 1 0 ??ℎ?????? 1) Find c. 2) Find the marginal PDFs of ? and ?. Make sure to write the ranges. Are these random variables independent? 3) Find ?(0 < ? < 1|0 < ? < 1) 4) What is ??|? (?|?). Make sure to write the range of ?.
In: Statistics and Probability
Correct all errors in the provided script. Remember that some errors are fatal (result in an error message) while others simply cause the program to produce incorrect results.
You can assume that you have fixed all errors when the checker passes all tests.
%***************************************************************************************
%It is recommended that you debug this program offline and submit only once you have corrected the errors
%***************************************************************************************
%%
%These 3 loops all calculate the sum of the integers from 1 through 1000
for number = 1:1000
total = total + number;
end
fprintf('The sum of the numbers from 1 through 1000 is %i\n', total);
k=0;
theTotal = 0;
while k <1000
theTotal = theTotal + k;
end
fprintf('The sum of the numbers from 1 through 1000 is %i\n', theTotal);
theTotal_2 = 0;
while k >1000
theTotal_2 = theTotal_2 + k;
k = k-1;
end
fprintf('The sum of the numbers from 1 through 1000 is %i\n', theTotal);
%%
%These structures all do the same thing - find the roots of a quadratic,
%and print out the real roots, if any
a = 1;
b = 3;
c = 2;
discriminant = b^2 - 4ac;
if discriminant > 0
root1 = (-b+sqrt(b^2 - 4*a*c))/(2*a);
root2 = (-b-sqrt(b^2 - 4*a*c))/(2*a);
fprintf('The roots are %f and %f\n', root1, root2);
elseif discriminant == 0
root1 = -b/(2*a);
root2 = NaN;
fprintf('The root is %f and %f\n', root1);
else
fprintf('There are no real roots\n');
end
aa = 1;
bb = -8;
cc = 16;
discriminant = bb^2 - 4*aa*cc;
switch discriminant
case discriminant>0
root3 = (-bb+sqrt(bb^2 - 4*aa*cc))/(2*aa);
root4 = (-bb-sqrt(bb^2 - 4*aa*cc))/(2*aa);
fprintf('The roots are %f and %f\n', root3, root4);
case discriminant == 0
root3 = -b/(2*a);
root4 = NaN;
fprintf('The root is %f\n', root3);
otherwise
fprintf('There are no real roots\n');
end
%%
%This program calculates and plots the Fibonacci numbers that are less than
%100
fibonacciNumber=[1, 1];
%first time through the loop, calculating the 3rd Fibonacci number
index = 3;
while fibonacciNumber < 100
fibonacciNumber(end+1) = fibonacciNumber(end) + fibonacciNumber(end-1);
index = index + 1;
end
try
assert(sum(fibonacciNumber>=100)==0)
%The following lines will only be executed if the assertion passes
fprintf('There are %i Fibonacci numbers that are less than 100;', length(fibonacciNumber));
fprintf('They are: \n')
fprintf('%i\n', fibonacciNumber);
plot(1:index, fibonacciNumber)
catch ME
switch ME.identifier
case 'MATLAB:assertion:failed'
disp('Incorrect set of Fibonnaci numbers.')
case 'MATLAB:samelen'
disp('error in plot - vectors not the same length')
otherwise
disp('Something is wrong with the Fibonacci number code')
end
end
%%
%This program calls the user-defined function, GPA() to calculate a
%student's grade point average
Grades = 'ABACAABBDAC';
Credits = [43454453324];
Name = "Joe";
GPAValue = gradePointAverage(grades, credits);
fprintf('%s''s GPA is %d\n', GPAValue);
function [ gradePointAverage] = GPA(letterGrades, numCredits )
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
qualityPoints = (letterGrades=='A')*4 + (letterGrades=='B')*3 + (letterGrades=='C')*2 + (letterGrades=='D')*1;
totalPoints = sum(qualityPoints.*credits);
gradePointAverage = totalPoints/sum(credits);
end
In: Computer Science
ONLY QUESTION 3 - PLEASE PROVIDE DETAILED INSTRUCTIONS
Quality Improvement and Profitability Objective
Gagnon Company reported the following sales and quality costs for the past four years. Assume that all quality costs are variable and that all changes in the quality cost ratios are due to a quality improvement program.
| Year | Sales Revenues | Quality Costs as a Percent of Revenues |
| 1 | $19,200,000 | 20% |
| 2 | 20,800,000 | 17 |
| 3 | 24,320,000 | 13 |
| 4 | 25,420,000 | 9 |
Required:
1. Compute the quality costs for all four years.
| Quality Cost | |
| Year 1 | $ |
| Year 2 | $ |
| Year 3 | $ |
| Year 4 | $ |
By how much did net income increase from Year 1 to Year 2
because of quality improvements?
$
By how much did net income increase from Year 2 to Year 3
because of quality improvements?
$
By how much did net income increase from Year 3 to Year 4
because of quality improvements?
$
2. The management of Gagnon Company believes it
is possible to reduce quality costs to 2 percent of sales. Assuming
sales will continue at the Year 4 level, calculate the additional
profit potential facing Gagnon.
$
Is the expectation of improving quality and reducing costs to 2
percent of sales realistic?
Yes
3. Assume that Gagnon produces one type of product,
which is sold on a bid basis. In Years 1 and 2, the average bid was
$400. In Year 1, total variable costs were $240.00 per unit. In
Year 3, competition forced the bid to drop to $320.00.
Do not round the intermediate calculations and round your final
answers to the nearest dollar.
Compute the total contribution margin in Year 3 assuming
the same quality costs as in Year 1.
$
Now, compute the total contribution margin in Year 3
using the actual quality costs for Year 3.
$
What is the increase in profitability resulting from the
quality improvements made from Year 1 to Year 3?
$
In: Accounting
You roll two six-sided even dice. What is the probability that you get a score of at least 11?
a. 2/11
b. 1/12
c. 1/18
d. 1/6
You toss a fair coin 3 times in a row. What is the probability of getting at most two heads?
a. 3/4
b. 1/4
c. 3/8
d. 7/8
In: Statistics and Probability