Match the scenario with the most appropriate statistical test to use
Hint: Some statistical tests will match with more than one scenario. Pay attention to the symbols used to give you information about whether the mean and standard deviation come from populations or samples.
A. Z-test
B. One sample t-test
C. Independent Sample t-test
D. related samples t-test
|
In: Statistics and Probability
We wish to determine if two instructors teaching the same introductory course have significantly different “DF rates” (defined as the proportion of students who receive a course grade of D or F among all students who complete the course).Each instructor teaches 60 students. Among the first instructor’s students, 21 receive a D or F. Among the second instructor’s students, 16 receive a D or F. Assume these can be treated as independent simple random samples from their respective populations.
Use this sample data to test the claim H0:(p1−p2)=0H0:(p1−p2)=0 against HA:(p1−p2)≠0HA:(p1−p2)≠0, using a significance level of 5%.
The value of the test statistic is z=
A large pharmaceutical company advertises that its newly-deleveloped drug is “more effective” at curing a certain disease than the existing drug of its leading competitor. To test this claim, we can compare the proportions of patients who are cured of the disease, depending on which drug they are using for treatment.In a simple random sample of 80 patients being treated with the newly-developed drug, 20 patients were successfully cured of the disease. In an independent simple random sample of 80 patients being treated with the existing drug, 12 patients were successfully cured of the disease.
Use the sample data to test the hypotheses H0:(p1−p2)=0H0:(p1−p2)=0 against HA:(p1−p2)>0HA:(p1−p2)>0, using a significance level of 5%.
The value of the test statistic is z =
In a certain population, it is believed that the proportion of men having red/green color blindness is higher than the proportion of women having red/green color blindness. A hypothesis test can be used to test this claim.
Independent simple random samples of 950 men and 2500 women are tested. Among the men in the sample, 81 have red/green color blindness. Among the women in the sample, 9 have red/green color blindness.The value of the test statistic is z=
In: Statistics and Probability
5. (a)A sample of 12 of bags of Calbie Chips were weighed (to the nearest gram), and listed, here as follows.
219, 226, 217, 224, 223, 216, 221, 228, 215, 229, 225, 229 Find a 95% confidence interval for the mean mass of bags of Calbie Chips.
[9 marks]
(b) Professor GeniusAtCalculus has two lecture sections (A and B) of the same 4th year Advanced Calculus (AMA 4301) course in Semester 2. She wants to investigate whether section A students maybe ”smarter” than section B students by comparing their perfor- mances in the midterm test. A random sample of 12 students were taken from section A, with mean midterm test score of 78.8 and standard deviation 8.5; and a random sample of 9 students were taken from section B, with mean midterm test score of 86 and standard deviation 9.3. Assume the population standard deviations of midterm test scores for both sections are the same. Construct the 90% confidence interval for the difference in midterm test scores of the two sections. Based on the sample midterm test scores from the two sections, can Professor GeniusAtCalculus conclude that there is any evidence that one section of students are ”smarter” than the other section? Justify your conclusions.
[8 marks]
(c) The COVID-19 (coronavirus) mortality rate of a country is defined as the ratio of the number of deaths due to COVID-19 divided by the number of (confirmed) cases of COVID-19 in that country. Suppose we want to investigate if there is any difference between the COVID-19 mortality rate in the US and the UK. On April 18, 2020, out of a sample of 671,493 cases of COVID-19 in the US, there was 33,288 deaths; and out of a sample of 109,754 cases of COVID-19 in the UK, there was 14,606 deaths. What is the 92% confidence interval in the true difference in the mortality rates between the two countries? What can you conclude about the difference in the mortality rates between the US and the UK? Justify your conclusions. [8 marks]
In: Statistics and Probability
CVP—sensitivity analysis. Joan’s Beauty College is considering introducing a new nail design seminar to run on an annual basis with the following price and cost characteristics:
|
Tuition |
$405.00 per Student |
|
Variable Costs (polish, supplies, etc.) |
$185.00 per Student |
|
Fixed Costs (advertising, instructor’s salary, insurance, etc.) |
$29,480 per Year |
Required:
2a. What enrollment enables Joan’s Beauty College to break even?
Break even = 29,490/(405-185)= 134
134 enrollment enable’s Joan’s Beauty College to break even.
2b. How many students will enable Joan’s Beauty College to make an operating profit of $35,750 for the year?
(29,480+35,750)/(405-185)= 296.5
It will take 297 students to enroll for Joan’s Beauty College to make a operating profit for the desired income of $35,750.
2c. Assume that the projected enrollment for the year is 350 students for each of the following situations:
(1) What will be the operating profit for 350 students?
((405-185) x 350) – 29,480 = $47,520
The operating profit for 350 students will be $47,520.
(2) What would be the operating profit and changecompared to the results from c(1)if the tuition per student (that is, sales price) (show amount change & %)
(i).decreased by 10 percent?
47,520 – (405*350*.10) = 47520 – 14,175 = $33,345 operating profit
Operating profit decrease % = (47,520 – 33,345)/ 47,520 = 29.83%
Operating profit change in amount is $14,175.
(ii). Increased by 20 percent?
47,520 + (405*350*.20) = 47,520 + 28,350 = $75,870 operating profit
Operating profit increase % = 28,350 / 47,520 = 59.66%
Operating profit change in amount is $28,350.
(3) What would be the operating profit and changecompared to the results from c(1)if variable costs per student (show amount change & %)
(i) increased by 10 percent?
(ii) Decreased by 20 percent?
(4) Suppose that fixed costs for the year are 10 percent lower than projected, whereas variable costs per student are 20 percent higher than projected. What would be the operating profit(loss)for the year?
In: Accounting
In the following scenario, each of the four categories of Principles Underlying an Audit Conducted in Accordance with Generally Accepted Auditing Standards are violated. In the box below (1) identify the four categories (the “P – R – P – R”) [2 points each], (2) provide a brief description of each category [2 points each], and (3) indicate at least one way that the actions of the auditor in the scenario violates each of the four categories of principles
Joni Thompson, the CEO of a small privately held company, contacted Darrel Folkert, CPA, about conducting an audit of the company’s records. Joni told Darrel that she needed an audit performed in accordance with generally accepted auditing standards (GAAS) in time to submit two years of audited financial statements to a bank as part of a loan application. Darrel immediately accepted the engagement and agreed to provide an audit report within three weeks. Joni agreed to pay Darrel a fixed fee if the loan was granted.
Darrel hired two Portland State University accounting students to conduct the audit and spent a couple of hours telling them exactly what to do. Darrel told the students not to spend time reviewing internal controls because it is not a publicly traded company, but to concentrate on proving the mathematical accuracy of the ledger accounts and summarizing the data in the accounting records that support Joni’s financial statements. Given the lack of procedures performed by the two accounting students, they did not identify that Joni did not have an allowance for uncollectible accounts, even though more than 50% of the balance in the Accounts Receivable account is two or more years old. The students followed Darrel’s instructions and after two weeks gave Darrel a Balance Sheet, Income Statement, and a Statement of Cash Flows. Darrel received the three statements and immediately prepared an unqualified (clean) audit report. The report did not refer to generally accepted accounting principles (GAAP), and the two accounting students did not check the accounting principles applied in prior periods. There was also no mention as to the responsibility of management or the degree of responsibility that Darrel was taking in the audit report.
In: Accounting
CVP—sensitivity analysis. Joan’s Beauty College is considering introducing a new nail design seminar to run on an annual basis with the following price and cost characteristics:
|
Tuition |
$405.00 per Student |
|
Variable Costs (polish, supplies, etc.) |
$185.00 per Student |
|
Fixed Costs (advertising, instructor’s salary, insurance, etc.) |
$29,480 per Year |
Required:
2a. What enrollment enables Joan’s Beauty College to break even?
Break even = 29,490/(405-185)= 134
134 enrollment enable’s Joan’s Beauty College to break even.
2b. How many students will enable Joan’s Beauty College to make an operating profit of $35,750 for the year?
(29,480+35,750)/(405-185)= 296.5
It will take 297 students to enroll for Joan’s Beauty College to make a operating profit for the desired income of $35,750.
2c. Assume that the projected enrollment for the year is 350 students for each of the following situations:
(1) What will be the operating profit for 350 students?
((405-185) x 350) – 29,480 = $47,520
The operating profit for 350 students will be $47,520.
(2) What would be the operating profit and changecompared to the results from c(1)if the tuition per student (that is, sales price) (show amount change & %)
(i).decreased by 10 percent?
47,520 – (405*350*.10) = 47520 – 14,175 = $33,345 operating profit
Operating profit decrease % = (47,520 – 33,345)/ 47,520 = 29.83%
Operating profit change in amount is $14,175.
(ii). Increased by 20 percent?
47,520 + (405*350*.20) = 47,520 + 28,350 = $75,870 operating profit
Operating profit increase % = 28,350 / 47,520 = 59.66%
Operating profit change in amount is $28,350.
(3) What would be the operating profit and changecompared to the results from c(1)if variable costs per student (show amount change & %)
(i) increased by 10 percent?
(ii) Decreased by 20 percent?
(4) Suppose that fixed costs for the year are 10 percent lower than projected, whereas variable costs per student are 20 percent higher than projected. What would be the operating profit(loss)for the year
In: Accounting
In this assessment you are required to design a wireless campus network for Faber University. This assessment is group assessment and you may work in groups of upto 4 students. To design the wireless campus network for the university you are required to conduct a requirement analysis, propose a design of the network considering the university requirements, carry out a security analysis and propose a WLAN monitoring tool for monitoring the network in the future. The network needs to be designed with an industry tool for example packet tracer, GNS3 etc. The assessment will help in developing an understanding of communication in wireless networks, the security issues and the limitations and challenges. Faber University has recently been experiencing a decreasing level of enrolment. Faber was built in the early 1900s, and until ten years ago, was known as one of the finest centres for higher education on the eastern seaboard. In the last ten years, however, enrolment seemed to plateau and then slowly decline. Faber's Chancellor Jennings has hired a polling agency and formed an action committee composed of faculty, students, and administration to determine the causes of the university's decline in enrolment. The polling agency surveys the graduating seniors and reports that the emerging needs of students are not being met. The new generation of student that the university wants to attract is the technically elite who are known as early technology acceptors. Faber's rich history and, consequently, its old network architecture and lack of technical infrastructure, security and privacy, are its downfall in this new, technological environment. The university has different areas and buildings, the Administration department, the Athletic department, the Engineering department, the Biological Sciences department, the Liberal Arts department, the Student Union, Residential halls, Sports complex, Lake and Park. The campus is spread over large land and each building and open space is 200 meters apart. All the buildings have multiple floors and the current enrolment of students is 5000, there are 50 staff members and guests also visit the campus. As IT students your group has been assigned to design the wireless network. The following process needs to be followed to design a secure wireless campus network that meets the university requirements.
• Requirement Analysis
• Wireless Network Design
• Security Analysis
• Maintenance and Troubleshooting
In: Computer Science
Do students reduce study time in classes where they achieve a higher midterm score? In a Journal of Economic Education article (Winter 2005), Gregory Krohn and Catherine O’Connor studied student effort and performance in a class over a semester. In an intermediate macroeconomics course, they found that “students respond to higher midterm scores by reducing the number of hours they subsequently allocate to studying for the course.” Suppose that a random sample of n = 8 students who performed well on the midterm exam was taken and weekly study times before and after the exam were compared. The resulting data are given in Table 10.6. Assume that the population of all possible paired differences is normally distributed. Table 10.6 Weekly Study Time Data for Students Who Perform Well on the MidTerm Students 1 2 3 4 5 6 7 8 Before 16 13 11 17 17 13 15 17 After 8 8 12 9 5 10 7 8 Paired T-Test and CI: Study Before, Study After Paired T for Study Before - Study After N Mean StDev SE Mean StudyBefore 8 14.8750 2.2952 .8115 StudyAfter 8 8.3750 2.0659 .7304 Difference 8 6.50000 4.03556 1.42678 95% CI for mean difference: (3.12619, 9.87381) T-Test of mean difference = 0 (vs not = 0): T-Value = 4.56, P-Value = .0026 (a) Set up the null and alternative hypotheses to test whether there is a difference in the true mean study time before and after the midterm exam. H0: µd = versus Ha: µd ≠ (b) Above we present the MINITAB output for the paired differences test. Use the output and critical values to test the hypotheses at the .10, .05, and .01 level of significance. Has the true mean study time changed? (Round your answer to 2 decimal places.) t = We have evidence. (c) Use the p-value to test the hypotheses at the .10, .05, and .01 level of significance. How much evidence is there against the null hypothesis? There is against the null hypothesis.
In: Math
Program for C++
A company has six salespeople. Every month, they go on road trips to sell the company’s product. At the end of each month, the total sales for a salesperson in that month, together with that salesperson’s ID and the month, is recorded in a file. At the end of each year, the manager of the company wants to see an annual sales report. Due to the amount of data involved, he’s like to be able to view the report by ID or by total sales.
Create a program to load id data from salesID.txt, sales data from salesData.txt (unknown # of records. The records are not in any order of sales id or month), calculate the total sales of each person in a year, and display a report. Shell code is provided in HW8_SalesReport_shell.cpp. You need understand the shell code and then add:
You’re not supposed to modify the given code otherwise
salesID.txt
32214
23422
57373
35864
54654
12345
salesData.txt
12345 1 893
32214 1 343
23422 3 903
57373 2 893
35864 5 329
54654 9 392
12345 2 999
32214 4 892
23422 4 895
23422 2 492
57373 6 892
35864 10 1223
54654 11 3420
12345 12 322
35864 5 892
54654 3 893
12345 8 494
32214 8 9023
23422 6 223
23422 4 783
57373 8 8834
35864 3 2882
HW8_SalesReport_shell.cpp
// HW8_SalesReport_shell.cpp (shell code. need ADD CODE #1 ~
#3)
// by Bin "Crystal" Peng, CS225
// generate sales report using monthly sales data
// fixed # of sales people; unknown # of sales record
#include <iostream>
#include <fstream> // std::ifstream
#include <string> // std::string
#include <iomanip> // std::setw(), std::fixed,
std::setprecision()
//----------------------------------------------
// global declarations
//----------------------------------------------
const int MAX = 10; // max # of sales person
struct salesPersonRec
{
std::string ID; // salesperson's ID
double totalSales; // salesperson's yearly sales amount
};
//----------------------------------------------
// function declarations
//----------------------------------------------
// read id data into array and set totalSales of each record to
0
bool loadID(salesPersonRec list[]/*OUT*/, int
listSize/*IN*/);
// Pre: listSize specified
// Post: listSize # of ids read in from file and saved in the ID
column in the first listSize records of list. totalSales of those
records set to 0
// read in sales data and calculate total sales per person
bool loadData(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/);
// Pre: listSize specified, list contains valid ids and totalSales
set to 0 for the first listSize records
// Post: sales data read from file
// totalSales of the first listSize records are set to accumulated
sales of the salesperson with the given id
// display menu on screen
void showMenu();
// Pre: none
// Post: menu choices printed on screen
// display id and yearly sales amout of all salespersons by id
order
void showReportByID(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/);
// Pre: listSize specified, list contains at least listSize number
of records
// Post: the first listSize records in list are reordered so they
are now in ascending order of the id column
// id and totalSales column of the first listSize records in list
are printed on screen
// display id and yearly sales amout of all salespersons by
total sales order
void showReportBySales(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/);
// Pre: listSize specified, list contains at least listSize number
of records
// Post: the first listSize records in list are reordered so they
are now in ascending order of the total sales column
// id and totalSales column of the first listSize records in list
are printed on screen
// sort sales person records by total sales amount
void sortBySales(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/);
// Pre: listSize specified, list contains at least listSize number
of records
// Post: the first listSize records in list are reordered so they
are now in ascending order of the totalSales column
// ADD CODE #1: two function declarations
// END ADD CODE #1
//----------------------------------------------
int main()
{
salesPersonRec salesPersonList[MAX]; // array to hold the
salesperson's data
int numOfSalesPerson = 6;
if (!loadID(salesPersonList, numOfSalesPerson)) // load id
data
return 1;
if (!loadData(salesPersonList, numOfSalesPerson)) // load sales
data
return 1;
// user interaction via menu
int option = 0; // user option
do
{
// display menu
showMenu();
// user option
std::cin >> option;
switch (option)
{
case 1: // sort and display report by id
showReportByID(salesPersonList, numOfSalesPerson);
break;
case 2: // sort and display report by sales
showReportBySales(salesPersonList, numOfSalesPerson);
break;
case 0: // exit
std::cout << "\nThank you for using our reporting
system!\n";
break;
default: // invalid input
std::cout << "invalid choice. Please try again.\n";
break;
}
} while (option != 0);
} // end main
//----------------------------------------------
// Function Implementation
//----------------------------------------------
// read id data into array and set totalSales of each record to
0
bool loadID(salesPersonRec list[]/*OUT*/, int listSize/*IN*/)
{
std::ifstream inFile; // input file
std::string idfilename = "salesID.txt";
// open id file
inFile.open(idfilename);
if (inFile.fail())
{
std::cerr << "Error: can't open input file \"" <<
idfilename << "\". Abort. \n"; // report to cerr
return false; // and end now
}
// read in id data
for (int index = 0; index < listSize; index++)
{
if (!(inFile >> list[index].ID)) // get salesperson's
ID
return false; // reading failed
list[index].totalSales = 0.0;
}
inFile.close(); // close file
return true;
} //end loadID
//----------------------------------------------
// read in sales data and calculate total sales of each
person
bool loadData(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/)
{
std::ifstream inFile; // input file
std::string datafilename = "salesData.txt";
// open sales data
inFile.open(datafilename);
if (inFile.fail())
{
std::cerr << "Error: can't open input file \"" <<
datafilename << "\". Abort. \n"; // report to cerr
return false; // and end now
}
// read in data and process
std::string id;
int month;
double amount;
// ADD CODE #2:
// read sales data from file,
// calculate and update totalSales of each record
// END ADD CODE #2
inFile.close(); // close data file
return true;
} //end loadData
//----------------------------------------------
// display menu on screen
void showMenu()
{
const std::string menuOptions[] = { "Options:",
"1. Display sales report by sales id.",
"2. Display sales report by annual sales amount.",
"0. Exit",
"Choose (0 ~ 2): "
};
int menuLen = sizeof(menuOptions) / sizeof(std::string);
std::cout << std::endl;
for (int i = 0; i < menuLen - 1; i++)
std::cout << menuOptions[i] << std::endl;
std::cout << menuOptions[menuLen - 1]; // last item
} // end getUserOption
//----------------------------------------------
void showReportByID(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/)
{
sortByID(list, listSize);
showReport(list, listSize);
} // end showReportByID
//----------------------------------------------
void showReportBySales(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/)
{
sortBySales(list, listSize);
showReport(list, listSize);
} // end showReportBySales
//----------------------------------------------
void sortBySales(salesPersonRec list[]/*INOUT*/, int
listSize/*IN*/)
{
// insertion sort
for (int i = 1; i < listSize; i++)
{
// find spot to insert [i]
salesPersonRec hold = list[i];
double amount = list[i].totalSales;
int indexToInsert = i - 1;
while (indexToInsert >= 0 && amount <
list[indexToInsert].totalSales)
{
// shift
list[indexToInsert + 1] = list[indexToInsert];
indexToInsert--;
}
// insert
list[indexToInsert + 1] = hold;
}
} // end sortBySales
//----------------------------------------------
// ADD CODE #3: implementation of two functions
// END ADD CODE #3
In: Computer Science
The signature of each function is provided below, do not make any changes to them otherwise the tester will not work properly. The following are the functions you must implement:
mashup(lst) [20pts]
Description: Creates a new string that is based on the provided list. Each number in the list specifies how many characters from the string that follows belong in the resulting string. Parameters: lst is a list of variable size, that contains alternating ints and strings Assumptions: When a pair of values doesn’t make sense, throw out that pair. When you have an empty string in the list, move on to the next pair. When you have a number that is larger than the length of the string, move on to the next pair, etc. Return value: the new string that is generated from the replacements Examples: mashup([2, 'abc', 1, 'def']) → 'abd' mashup([3, 'rate', 2, 'inside', 1, 'goat']) → 'rating'
expand(numbers, amount) [20pts]
Description: Given a list of numbers it returns that same list that has been expanded with a certain amount of zeroes around all of the numbers, including at the beginning and end of the list. Parameters: numbers is a list of mixed int and float Assumptions: You will always have at least one element in numbers. amount will be >= 0 Return value: Nothing is returned. The swapping occurs in-place, i.e. you modify numbers itself Examples: ls = [1,2,3] expand(ls, 1) # nothing is returned! print(ls) # prints [0,1,0,2,0,3,0] ls = [1.5, -6, 4, 0] expand(ls, 2) # nothing is returned! print(ls) # prints [0, 0, 1.5, 0, 0, -6, 0, 0, 4, 0, 0, 0, 0, 0]
Assumptions for the following two problems: There will be at least one row and one column in the matrix. All rows will have the same number of elements.
squarify(matrix) [25pts]
Description: Determine the size of the largest square that can be made with the given matrix. Construct a new square matrix of this size using the elements from the original matrix in their original order. Parameters: matrix (list of lists of int) Return value: A new matrix (list of lists of int) Examples: ls = [[1,2,3,4],[5,6,7,8],[9,10,11,12]] new_ls = squarify(ls) print(new_ls) # prints [[1, 2, 3], [5, 6, 7], [9, 10, 11]]
apply(mask, matrix) [25pts]
Description: Given a matrix, apply the mask. The matrix is some MxN list of list of ints, and the mask is exactly a 2x2 list of lists of ints. Imagine you overlay the mask on top of the matrix, starting from the top left corner. There will be 4 places that overlap. Add each pair of numbers that are overlapped, and update the original matrix with this new value. Shift the mask down the row of the matrix to the next 2x2 that hasn't been updated already, and continue this process. Keep doing this down the columns as well. If you are on an edge and only a piece of the mask overlaps, you can ignore the other numbers and only update the overlapping portion. Parameters: matrix (MxN list of list of ints) and mask (2x2 list of list of ints) Return value: Nothing is returned. The updating occurs in-place, i.e. you modify matrix itself Examples: ls = [[1,2],[3,4]] apply([[1,1],[1,1]], ls) # nothing is returned! print(ls) # prints [[2, 3], [4, 5]] ls = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] apply([[1,1],[1,1]], ls) # nothing is returned! print(ls) # prints [[2, 3, 4], [5, 6, 7], [8, 9, 10]] ls = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]] apply([[1,0],[0,1]], ls) # nothing is returned! print(ls) # prints [[2, 2, 4], [4, 6, 6], [8, 8, 10], [10, 12, 12]]
In: Computer Science