1. A good quality lawnmower is supposed to start at the first try. In the third quarter, 50 craftsman lawnmowers are started every day and an average of 4 did not start. In the fourth quarter, the number of lawnmower did not start (out of 50) in the first 6 days are 4, 5, 4, 6, 7, 6, respectively. Was the quality of lawnmower changed in the fourth quarter?
2.There have been complaints that the sports page of the Dubuque
Register has lots of typos. The last 6 days have been examined
carefully, and the number of typos/page is recorded below. Is the
process in control?
| Day | Mon | Tue | Wed | Thurs | Fri | Sat |
| Typos | 2 | 1 | 5 | 3 | 4 | 0 |
In: Operations Management
A researcher predicts that students will learn most effectively with a constant background sound, as opposed to an unpredictable sound or no sound at all. For group 1 subjects study with background sound at a constant volume in the background. For group 2 subjects study with noise that changes volume periodically. For group 3 subjects study with no sound at all. After studying, students take 10 point multiple choice test over the material. Their scores follow:
|
Constant Sound |
Random Sound |
No Sound |
|
7 |
5 |
2 |
|
4 |
5 |
2 |
|
6 |
3 |
3 |
|
8 |
4 |
1 |
|
6 |
4 |
2 |
|
6 |
7 |
1 |
|
2 |
2 |
4 |
|
9 |
2 |
4 |
What is the test statistics of the above data analysis if the three groups are independent groups?
What is the p-value of the above analysis?
Which of the following statement is correct:
Select one:
a. There were significant differences between for all different sound conditions.
b. The subjects’ score of constand background sound is significantly higher than that of the random background sound condition.
c. The subjects’ score of random backgroundsound is significantly higher than that of the no background sound condition.
d. The subjects’ score of constant background soud is significantly higher than that of the no background sound condition.
What if the three conditions were given to one group of subjects only? What would be the test statistics?
What would be the p-value?
The parametric assuption of the data is assumed.
Select one:
a, True
b, False
In: Statistics and Probability
a football team consists of 18 each freshman and sophemore 13 juniors and 15 seniors 4 players are selected at random to serve as captains find the probability of the following
all 4 are seniors
3 are seniors
2 are seniors
1 is senior
all 4 are juniors
In: Statistics and Probability
Does the design of the keyboards (A,B, & C) effect typing performance? Test at .05 level of significance. Keyboard A: 0, 4, 0, 1, 0 Keyboard B: 6, 8, 5, 4, 2 Keyboard C: 6, 5, 9, 4, 6
In: Statistics and Probability
Array Selector
Problem Overview
This assignment focuses on implementing the methods of a class much like java.util.Arrays. The Selector.java file defines a class with static methods designed to provide useful functionality on arrays, with the common theme of selecting values in an array with particular properties. Each method of Selector is clearly specified, is independent of the other methods in the class, and is designed to provide relatively simple functionality. So, this is a great context in which to practice systematic, disciplined development and test-based verification.
The Selector class
You must correctly implement all the method bodies of the provided Selector class. Your implementation must adhere exactly to the API of the Selector class, as described in the provided source code comments and as described below.
public final class Selector {
public static int min(int[] a)
public static int max(int[] a)
public static int kmin(int[] a, int k)
public static int kmax(int[] a, int k)
public static int[] range(int[] a, int low, int high)
public static int ceiling(int[] a, int key)
public static int floor(int[] a, int key)
}
A brief description of each method is provided below, along with examples of its use. Refer to the Selector.java source code file for the complete specification of each method’s required behavior.
The min method
This method selects the minimum value from a given array. Examples:
| a[] | min(a) |
|---|---|
| [2, 8, 7, 3, 4] | 2 |
| [5, 9, 1, 7, 3] | 1 |
| [8, 7, 6, 5, 4] | 4 |
| [8, 2, 8, 7, 3, 3, 4] | 2 |
The max method
This method selects the maximum value from a given array. Examples:
| a[] | max(a) |
|---|---|
| [2, 8, 7, 3, 4] | 8 |
| [5, 9, 1, 7, 3] | 9 |
| [8, 7, 6, 5, 4] | 8 |
| [8, 2, 8, 7, 3, 3, 4] | 8 |
The kmin method
This method selects the k-th minimum (smallest) value from a given array. A value is the k-th minimum if and only if there are exactly k - 1 distinct values strictly less than it in the array. Note that kmin(a, 1) == min(a) and kmin(a, a.length()) == max(a). Examples:
| a[] | k | kmin(a, k) |
|---|---|---|
| [2, 8, 7, 3, 4] | 1 | 2 |
| [5, 9, 1, 7, 3] | 3 | 5 |
| [8, 7, 6, 5, 4] | 5 | 8 |
| [8, 2, 8, 7, 3, 3, 4] | 3 | 4 |
The kmax method
This method selects the k-th maximum (largest) value from a given array. A value is the k-th maximum if and only if there are exactly k - 1 distinct values strictly greater than it in the array. Note that kmax(a, 1) == max(a) and kmax(a, a.length()) == min(a). Examples:
| a[] | k | kmax(a, k) |
|---|---|---|
| [2, 8, 7, 3, 4] | 1 | 8 |
| [5, 9, 1, 7, 3] | 3 | 5 |
| [8, 7, 6, 5, 4] | 5 | 4 |
| [8, 2, 8, 7, 3, 3, 4] | 3 | 4 |
The range method
This method selects all values from a given array that are greater than or equal to low and less than or equal to high.
| a[] | low | high | range(a, low, high) |
|---|---|---|---|
| [2, 8, 7, 3, 4] | 1 | 5 | [2, 3, 4] |
| [5, 9, 1, 7, 3] | 3 | 5 | [5, 3] |
| [8, 7, 6, 5, 4] | 4 | 8 | [8, 7, 6, 5, 4] |
| [8, 2, 8, 7, 3, 3, 4] | 3 | 7 | [7, 3, 3, 4] |
The floor method
This method selects from a given array the largest value that is less than or equal to key. Examples:
| a[] | key | floor(a, key) |
|---|---|---|
| [2, 8, 7, 3, 4] | 6 | 4 |
| [5, 9, 1, 7, 3] | 1 | 1 |
| [8, 7, 6, 5, 4] | 9 | 8 |
| [8, 2, 8, 7, 3, 3, 4] | 5 | 4 |
The ceiling method
This method selects from a given array the smallest value that is greater than or equal to key. Examples:
| a[] | key | ceiling(a, key) |
|---|---|---|
| [2, 8, 7, 3, 4] | 1 | 2 |
| [5, 9, 1, 7, 3] | 7 | 7 |
| [8, 7, 6, 5, 4] | 0 | 4 |
| [8, 2, 8, 7, 3, 3, 4] | 5 | 7 |
Notes and Other Requirements
The Selector.java source code file is provided in the startercode folder in Vocareum. You can download Selector.java from Vocareum and work on your local machine.
The comments provided in Selector.java describe the required behavior of each method.
The constructor of the Selector class has been written for you and it must not be changed in any way.
You may add any number of private methods that you like, but you may not add any public method or constructor, nor may you change the signature of any public method or constructor.
You must not add any fields, either public or private, to the Selector class.
The java.util.Arrays class has been imported for you. You are free to delete this import statement if you do not use any methods from the Arrays class in your solutions.
You may not add any other import statement, and you may not use another resource from the java.util package. The penalty for violating this constraint will be a deduction of points up to 50% of the total points available on the assignment.
You may not use sorting in any method, except for kmin and kmax. The penalty for violating this constraint will be a deduction of points up to 50% of the total points available on the assignment.
You do not have to use sorting in kmin and kmax, but doing so makes the solution more straightforward. If you choose to use sorting in these two methods, I suggest that you use the sort(int[]) method from the java.util.Arrays class.
import java.util.Arrays;
/**
* Defines a library of selection methods
* on arrays of ints.
*
* @author YOUR NAME ([email protected])
* @author Dean Hendrix ([email protected])
* @version TODAY
*
*/
public final class Selector {
/**
* Can't instantiate this class.
*
* D O N O T C H A N G E T H I S C O N S T R U C T O R
*
*/
private Selector() { }
/**
* Selects the minimum value from the array a. This method
* throws IllegalArgumentException if a is null or has zero
* length. The array a is not changed by this method.
*/
public static int min(int[] a) {
return -99;
}
/**
* Selects the maximum value from the array a. This method
* throws IllegalArgumentException if a is null or has zero
* length. The array a is not changed by this method.
*/
public static int max(int[] a) {
return -99;
}
/**
* Selects the kth minimum value from the array a. This method
* throws IllegalArgumentException if a is null, has zero
length,
* or if there is no kth minimum value. Note that there is no
kth
* minimum value if k < 1, k > a.length, or if k is larger
than
* the number of distinct values in the array. The array a is
not
* changed by this method.
*/
public static int kmin(int[] a, int k) {
return -99;
}
/**
* Selects the kth maximum value from the array a. This method
* throws IllegalArgumentException if a is null, has zero
length,
* or if there is no kth maximum value. Note that there is no
kth
* maximum value if k < 1, k > a.length, or if k is larger
than
* the number of distinct values in the array. The array a is
not
* changed by this method.
*/
public static int kmax(int[] a, int k) {
return -99;
}
/**
* Returns an array containing all the values in a in the
* range [low..high]; that is, all the values that are greater
* than or equal to low and less than or equal to high,
* including duplicate values. The length of the returned
array
* is the same as the number of values in the range
[low..high].
* If there are no qualifying values, this method returns a
* zero-length array. Note that low and high do not have
* to be actual values in a. This method throws an
* IllegalArgumentException if a is null or has zero length.
* The array a is not changed by this method.
*/
public static int[] range(int[] a, int low, int high) {
return null;
}
/**
* Returns the smallest value in a that is greater than or equal
to
* the given key. This method throws an IllegalArgumentException
if
* a is null or has zero length, or if there is no qualifying
* value. Note that key does not have to be an actual value in
a.
* The array a is not changed by this method.
*/
public static int ceiling(int[] a, int key) {
return -99;
}
/**
* Returns the largest value in a that is less than or equal
to
* the given key. This method throws an IllegalArgumentException
if
* a is null or has zero length, or if there is no qualifying
* value. Note that key does not have to be an actual value in
a.
* The array a is not changed by this method.
*/
public static int floor(int[] a, int key) {
return -99;
}
}
In: Computer Science
1) what are the effect of leaving groups when comparing 1-chlorobutane vs. 1-bromobutane and compared 2-chlorobutane vs. 2-bromobutane. 2) What are the effect of structures – 1°, 2°, and 3° halides when comparing 1-chlorobutane vs. 2-chlorobutane vs. 2-chloro-2-methylpropane and comparing 1-bromobutane vs. 2-bromobutane vs. 2-bromo-2-methylpropane. 3) What is the effect of steric hinderance when compairing 1-chlorobutane vs. 1-chloro-2-methylpropane. 4) What is the difference in reactivity of alkyl halide when comparing bromocyclohexane vs. bromocyclopentane in SN reaction. 5) What is the difference in reactivity of alkyl halide when comparing bromocycllohexane vs. bromocyclopentane in SN2 reaction.
In: Chemistry
Many regions in North and South Carolina and Georgia have experienced rapid population growth over the last 10 years. It is expected that the growth will continue over the next 10 years. This has motivated many of the large grocery store chains to build new stores in the region. The Kelley’s Super Grocery Stores Inc. chain is no exception. The director of planning for Kelley’s Super Grocery Stores wants to study adding more stores in this region. He believes there are two main factors that indicate the amount families spend on groceries. The first is their income and the other is the number of people in the family. The director gathered the following sample information.
| Family | Food | Income | Size | |||||
| 1 | $ | 4.14 | $ | 73.98 | 4 | |||
| 2 | 4.08 | 54.90 | 2 | |||||
| 3 | 5.76 | 138.86 | 4 | |||||
| 4 | 3.48 | 52.02 | 1 | |||||
| 5 | 4.20 | 65.70 | 2 | |||||
| 6 | 4.80 | 53.64 | 4 | |||||
| 7 | 4.32 | 79.74 | 3 | |||||
| 8 | 5.04 | 68.58 | 4 | |||||
| 9 | 6.12 | 165.60 | 5 | |||||
| 10 | 3.24 | 64.80 | 1 | |||||
| 11 | 4.80 | 138.42 | 3 | |||||
| 12 | 3.24 | 125.82 | 1 | |||||
| 13 | 7.17 | 77.58 | 7 | |||||
| 14 | 5.94 | 146.51 | 6 | |||||
| 15 | 6.60 | 162.69 | 8 | |||||
| 16 | 5.40 | 141.30 | 3 | |||||
| 17 | 6.00 | 36.90 | 5 | |||||
| 18 | 5.40 | 56.88 | 4 | |||||
| 19 | 3.36 | 71.82 | 1 | |||||
| 20 | 4.68 | 69.48 | 3 | |||||
| 21 | 4.32 | 54.36 | 2 | |||||
| 22 | 5.52 | 87.66 | 5 | |||||
| 23 | 4.56 | 38.16 | 3 | |||||
| 24 | 5.40 | 43.74 | 7 | |||||
| 25 | 6.71 | 59.83 | 5 | |||||
Food and income are reported in thousands of dollars per year, and the variable size refers to the number of people in the household.
1. a-2. Do you see any problem with multicollinearity?
b-1. Determine the regression equation. (Round your answer to 3 decimal places.)
The regression equation is:
Food=_________+_________Income+________size.
b-2. How much does an additional family member add to the amount spent on food? (Round your answer to the nearest dollar amount.)
Another member of the family adds__________to the food bill.
c-1. What is the value of R2? (Round your answer to 3 decimal places.)
R2________
c-2. Complete the ANOVA (Leave no cells blank - be certain to enter "0" wherever required. Round SS, MS to 4 decimal places and F to 2 decimal places.)
Source DF SS MS F p-value
Regression
Error
Total
c-3. State the decision rule for 0.05 significance level. H0: = β1 = β2 = 0; H1: Not all βi's = 0. (Round your answer to 2 decimal places.)
H0 is rejected if F>______
c-4. Can we reject H0: = β1 = β2 = 0?
______H0. At least one of the regression coefficients is ______
d-1. Complete the table given below. (Leave no cells blank - be certain to enter "0" wherever required. Round Coefficient, SE Coefficient, P to 4 decimal places and T to 2 decimal places.)
d-2. Would you consider deleting either of the independent variables?
From the graph the residuals appear normally distributed.
True
False
There is a homoscedasticity problem.
There is no homoscedasticity problem.
In: Statistics and Probability
Hi there, I have put up the full sheet but it is question two that I need answered the most. Thank you for your time.
Question 1.
Drunk driving is one of the main causes of car accidents. Interviews with drunk drivers who were involved in accidents and survived revealed that one of the main problems is that drivers do not realise that they are impaired, thinking “I only had 1-2 drinks … I am OK to drive.” A sample of 5 drivers was chosen, and their reaction times (seconds) in an obstacle course were measured before and after drinking two beers. The purpose of this study was to check whether drivers are impaired after drinking two beers. Below is the data gathered from this study:
Driver 1 2 3 4 5
Before 6.15 2.86 4.55 3.94 4.19
After 6.85 4.78 5.57 4.01 5.72
1. The two measurements are dependent. Explain why. [1 mark]
2. Provide an estimate of the mean difference in reaction times between the two measurements. [4 marks]
3. Calculate and interpret a 95% confidence interval for the mean difference in reaction times between the two measurements. [15 marks]
4. Use a 5% level of significance and the following points to test the claim that reaction times before drinking two bears is lower than reaction times after drinking two bears.
(a) State the null and alternative hypotheses in symbolic form and in context.
(b) Calculate the test statistic.
(c) Identify the rejection region(s).
(d) Clearly state your conclusions (in context). [4 marks each]
5. What would the conclusion be if using a 1% level of significance? Justify your answer. [4 marks]
Question 2
This is part 2, this is the part that I need answered. Thank you for your time.
It was believed from the experiment on the obstacle course, in Part I, that there is a relationship between a subject’s reaction time before drinking two beers and the subject’s age:
Driver 1 2 3 4 5
Age (years) 20 30 25 27 26
1. What type of study is being outlined here? Justify your answer. [2 marks]
2. Plot a graph representing the relationship between reaction times before drinking two beers and age. [5 marks]
3. From the graph in Q2, suggest a relationship that could exist between the two measurements. [2 marks]
4. Use a 1% level of significance and the following points to test the claim that there is a relationship between the reaction times before drinking two beers and age.
(a) State the null and alternative hypotheses in context. [3 marks]
(b) Calculate the test statistic. [8 marks]
(c) Identify the rejection region(s). [4 marks]
(d) Clearly state your conclusions (in context). [4 marks]
5. What percentage of variation in reaction times before drinking two beers is unexplained by the relationship between reaction times before drinking two beers and age? [2 marks]
6. Derive a model/equation that could be used to predict reaction times before drinking two beers for a person, if the age of the person is known. [8 marks]
7. Using the model derived in Q6, what would the predicted reaction time, in the obstacle course, before drinking two beers of a 22-year-old be? [2 marks
In: Math
According to Zeller's Formula, the day of the week can be calculated by:
f=k+(13m−1)/5+D+D/4+C/4−2C
where:
•k is the day of the month.
•m is the month number designated in a special way: March is 1, April is 2, . . . , December is10; January is 11, and February is 12. If x is the usual month number, i.e. for January x is 1, for February x is 2, and so on; then m can be computed with this formula:m= (x+21)%12+1,where % is the usual modulus (i.e. remainder) function. Alternatively,m can be computed in this way:
m= x+10, if x≤2, or x−2 otherwise.
•D is the last two digits of the year, but if it is January or February those of the previous year are used.
•Cis for century, and it is the first two digits of year. In our example,C=20.
•From the result f we can obtain the day of the week based on this code:
Day0 = Sunday...Day 6 = Saturday
For example, if=123, thenf%7=4, and thus the day was Thursday. Again, % is the modulus function.
What was the day on June, 1 2005 according to Zeller's formula?
In: Advanced Math
Chronic insomnia
10 people with chronic insomnia received a study in 4 studies that were intended to increase the number of hours of sleep. One of these treatments was placebo.
1- Calculate the average number of hours of sleep for each of the 4 treatments. Also enter a 95% confidence interval for the average.
2- Create box plot for each of the 4 treatments in the same graph. How will you describe the distribution of treatments?
3- Calculate how much extra sleep patients have received after each treatment compared to when they received a placebo. How many have had more sleep and how many have had less sleep in each of the treatment groups? What will be the average extra sleep for each treatment?
4- Test if there is statistically significant difference between each of the treatments and placebo (beh1 vs. placebo, beh2 vs. placebo, beh3 vs. placebo). Be sure to check the assumptions that are the basis for performing a t-test.
5- Is treatment 2 more effective than treatment 3? Make an analysis based on both confidence interval and p-value.
SPSS FILE 1
Patients
1
2
3
4
5
6
7
8
9
10
SPSS FILE 2
Placebo
.6
3.0
4.7
5.5
6.2
3.2
2.5
2.8
1.1
2.9
SPSS FILE 3
Treatment 1
1.3
1.4
4.5
4.3
6.1
6.6
6.2
3.6
1.1
4.9
SPSS FILE 4
Treatment 2
2.5
3.8
5.8
5.6
6.1
7.6
8.0
4.4
5.7
6.3
SPSS FILE 5
Treatment 3
2.1
4.4
4.7
4.8
6.7
8.3
8.2
4.3
5.8
6.4
In: Statistics and Probability