For the following situations, indicate the statistical test you would conduct and WHY (that is, explain the variables)!
choose between paired sample t test, one way anova test, 2 sample t test.
A researcher is interested in how consumers make purchase decisions for a specific type of product. He develops a survey where, among other things, he asks to what extent price matters to people (on a Likert scale from 1 to 5) and to what extent quality matters to people (on a Likert scale from 1 to 5) when they try to decide which brand to buy.
Respondents in a survey of 1,000 households were asked about their travel history. Specifically, they were asked how often they have been to Europe in the past five years (using a ratio scale). People were also classified by interest type (art-lovers, food-lovers, or sports-lovers). The question is whether interest type influences travel history.
A restaurant is working on a new strategy to get consumers to eat healthier. They decide to run an experiment. As part of the experiment, the restaurant varies the presentation format of their menu. One week, they present their menu in picture format (that is, patrons see the picture of a dish and the name). The other week, they present their menu in text format (that is, patrons see a text description of a dish and the name). The restaurant is measuring how much money customers spent (using a ratio scale) on a healthy meal each week.
In: Statistics and Probability
JAVA LANGUAGE
Required Tasks:
In Eclipse, create a Java Project as CS-176L-Assign5.
Create 3 Java Classes each in its own file Student.java,
StudentList.java, and Assign5Test.java.
Copy your code from Assignment 4 into the Student.java and
StudentList.java Classes. Assign5Test.java should contain the main
method.
Modify StudentList.java to use an ArrayList instead of an array.
You can find the basics of ArrayList here:
https://www.w3schools.com/java/java_arraylist.asp
In StudentList.java, create two new public methods:
The addStudent method should have one parameter of type Student and
should add the given Student to the StudentList.
The removeStudent method should have one parameter of type String.
The String is the email of the student to be removed from the
StudentList.
In Assign5Test.java do the following:
Create a new StudentList containing 3 students.
Print the info of all the Students in the StudentList using the
getAllStudentInfo method.
Remove one Student from the StudentList using the removeStudent
method.
Add two new Students to the StudentList using the addStudent
method.
Print the info of all the Students in the StudentList using the
getAllStudentInfo method. Notice that one Student was removed and
two were added.
Code must compile and run without warnings or errors.
Final output should look something like the following:
Name: [Abdulmuhsin J.Al-Kandari], Email: [[email protected]],
Major: [SE], GraduationYear: [2017]
Name: [Justin R. Schlemm], Email: [[email protected]], Major:
[SE], GraduationYear: [2016]
Name: [Mary F. Menges], Email: [[email protected]], Major:
[SE], GraduationYear: [2017]
Name: [Abdulmuhsin J.Al-Kandari], Email:
[[email protected]], Major: [SE], GraduationYear: [2017]
Name: [Justin R. Schlemm], Email: [[email protected]], Major:
[SE], GraduationYear: [2016]
Name: [Nicholas-Jason R. Roache], Email: [[email protected]],
Major: [CS], GraduationYear: [2017]
Name: [Taylor J. Klodowski], Email: [[email protected]], Major:
[SE], GraduationYear: [2016]
public class Student{
private String name;
private String email;
private String major;
private int graduationYear;
public Student(String name, String email, String majaor, int
graduationYear) { // added graduation year in Constructer
setName(name);
setEmail(email);
setMajor(major);
setGraduationYear(graduationYear);
}
public int getGraduationYear() { // getgraduation method
return graduationYear;
}
public void setGraduationYear(int graduationYear) { // set
graduation method
this.graduationYear = graduationYear;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMajor() {
return major;
}
public void setMajor(String major) {
this.major = major;
}
@Override
public String toString() {
return "Name: [" + this.name + "], Email: [" + this.email + "],
Major: [" + this.major + "], GraduationYear: [" +
this.graduationYear + "]"; // added graduation year to the toString
method
}
}
public class StudentList {
private static final boolean StudentInfo = false;
private Student[] studentArray;
public String email;
public StudentList(Student[] studentArray) {
setStudentArray(studentArray);
}
public void setStudentArray(Student[] studentArray) {
this.studentArray = studentArray;
}
public Student[] getStudentArray() {
return studentArray;
}
public int studentcount(String major) {
int count = 0;
for(int i = 0; i < studentArray.length; i++) {
if(major.equals(studentArray[i].getMajor())){
count++;
}
}
return count;
}
public Student getStudentInfo(String email) {
for(int i = 0; i < studentArray.length; i++) {
if(studentArray[i].getEmail() == email) {
return studentArray[i];
}
}
return null;
}
public String getAllStudentInfo() {
String returnString = "";
for(int i = 0; i < studentArray.length; i++) {
returnString += studentArray[i].toString() +
System.lineSeparator();
}
return returnString;
}
public String studentInfo(String string) {
return null;
}
public boolean updateStudentGraduationYear(String email, int year) { // added method to update the graduation year of a student using the email.
for(int i = 0; i < studentArray.length; i++) {
if(studentArray[i].getEmail() == email) {
studentArray[i].setGraduationYear(year);
return true; // if found updated and returned true
}
}
return false; // else false
}
}
In: Computer Science
In your medical practice, you have observed that iron deficiency anemia appears to develop in a higher proportion of women who follow a strict vegan diet. You decide to conduct a prospective cohort study.
A. Develop a hypothesis for your study
B. Identify the exposure (independent variable)
C. Identify the outcome (the dependent variable)
D. List at least 2 confounding variables
E. How will you account for these variables in your study?
In: Statistics and Probability
There can be both positive and negative correlations between variables that are statistically significant enough to validate causation.
| True | |
| False |
Symmetrical data results in descriptive statistics that demonstrate little variance
| True | |
| False |
In matters of ranking results on exams, and other tools to measure performance, percentiles are a good method to assess performances within a cohort.
| True | |
| False |
Floors and ceilings rarely give consumers a true picture of cost paid by suppliers.
| True | |
| False |
In: Economics
A. State
B. County
C. Census tract
D. All of the above
A. Secular trends
B. Cyclic trends
C. Point epidemic
D. Clustering
A. Data collection methods
B. Unit of observation
C. Timing of data collection
D. All of the above
A. Ecologic Association
B. Ecologic correlation
C. Ecologic fallacy
D. None of the above
A. Prospective cohort study
B. Case-control study
C. Cross-sectional study
D. Retrospective cohort study
A. Rigorous inclusion and exclusion criteria
B. Blinding or masking to prevent bias
C. Comparable measurement of outcomes in treatment and control conditions
D. All of the above
In: Statistics and Probability
In a recent national survey, 30 Canadian adults aged 18-24 reported having used cannabis for the first time since its legalisation in 2018 compared to 68 among the 25-44-year-olds. Out of the 1500 survey respondents, 125 were 18-24-year-olds and 400 were in the 25-44 age group. The Public Health Agency has been concerned that the first time use of cannabis among the younger cohort is higher than that among the older cohort.
a) Formulate the appropriate statistical hypotheses to test if the proportion of first-time cannabis users is higher among younger adults.
b) Perform the appropriate hypothesis test manually using the P-value approach and a 2% significance level. Make sure you verify that the relevant assumptions and conditions are met for the test.
c) Using the corresponding confidence level, calculate a one-sided confidence interval for the difference in the proportions of first-time cannabis users among the two age groups.
d) Are the results from b) and c) above consistent and why?
e) Use Minitab or other appropriate software to perform the calculations in b) and c) and comment on any differences.
In: Statistics and Probability
Please show your calculations and steps. In a recent national survey, 30 Canadian adults aged 18-24 reported having used cannabis for the first time since its legalisation in 2018 compared to 68 among the 25-44-year-olds. Out of the 1500 survey respondents, 125 were 18-24-year-olds and 400 were in the 25-44 age group. The Public Health Agency has been concerned that the first time use of cannabis among the younger cohort is higher than that among the older cohort.
a) Formulate the appropriate statistical hypotheses to test if the proportion of first-time cannabis users is higher among younger adults.
b) Perform the appropriate hypothesis test manually using the P-value approach and a 2% significance level. Make sure you verify that the relevant assumptions and conditions are met for the test.
c) Using the corresponding confidence level, calculate a one-sided confidence interval for the difference in the proportions of first-time cannabis users among the two age groups.
d) Are the results from b) and c) above consistent and why? e) Use Minitab or other appropriate software to perform the calculations in b) and c) and comment on any differences.
In: Math
Start your research by referring to Apple’s fiscal 2016 (September 24, 2016) in Appendix A of Wild Financial Accounting 9 edition textbook. Find the financial statement that lists the number of shares of common stock authorized, issued and outstanding. Note the name of that financial statement to include in your post. Here are the number of share information you should locate in the textbook Appendix: Authorized: 12,600,000 Issued and outstanding 9/24/2016 5,336,166 Issued and outstanding 9/26/2015 5,578,753 How to find Apple’s fiscal 2018 annual financial statements. Suggested steps to follow: Search for Apple Investor Relations, SEC Filings, Annual Filings, 10-K. For fiscal year-end 9/29/2018 and 9/30/2017 answer the following questions. Name of the financial statement you are finding this information on (see above background) How many shares of common stock are authorized? How many shares of common stock are issued and outstanding for 9/29/2018? How many shares of common stock are issued and outstanding for 9/30/2017? If a financial statement reader wants to see the detail of change in a number of shares of stock from the beginning of each year to the end of each fiscal year, which financial statement would he/she refer to? Explain why Apple’s fiscal year-end does not always fall on the same day. Hint: Apple’s 10-K Part I, Item 1..
In: Accounting
QUESTION 60
Given the following Product structure:
struct Product {
string name;
double price;
int quantity;
bool equals(const Product&);
};
how would you define the equals function so two products are equal
if their names and prices are equal?
| a. |
bool equals(const Product& to_compare) { |
|
| b. |
bool Product::equals(const Product& to_compare)
{ |
|
| c. |
bool equals(const Product& to_compare) { |
|
| d. |
bool Product::equals(const Product& to_compare)
{ |
1.5 points
QUESTION 61
What are the values of the keys in the set named years after the
following code is executed?
set<int> years { 2016, 1985, 2001 };
years.insert(1992);
years.insert(2001);
auto iter = years.find(1985);
if (iter != years.end()) {
years.erase(iter);
}
| a. |
2016, 2001, 1992 |
|
| b. |
1992, 2001, 2016 |
|
| c. |
2016, 2001, 2001, 1992 |
|
| d. |
1992, 2001, 2001, 2016 |
1.5 points
QUESTION 62
The capacity of a vector indicates
| a. |
the number of elements it can currently store |
|
| b. |
the current size of the vector in bytes |
|
| c. |
the largest number of elements it can store |
|
| d. |
the number of elements it contains |
1.5 points
QUESTION 63
Which of the following is not a limitation of an array when compared with a vector?
| a. |
An array can’t increase its size automatically. |
|
| b. |
The size of an array must be known at compile time. |
|
| c. |
An array doesn’t use memory as efficiently as a vector. |
|
| d. |
An array doesn’t provide functions that let you modify its elements. |
1.5 points
QUESTION 64
A stack container provides
| a. |
last-in, first-out access |
|
| b. |
first-in, last-out access |
|
| c. |
last-in, last out access |
|
| d. |
first-in, first-out access |
1.5 points
QUESTION 65
Code Example 9-2
struct Phone {
int area_code;
int prefix;
int number;
};
struct Contact {
string name;
string email;
Phone phone;
};
(Refer to Code Example 9-2.) Given a Contact object named contact, what code would you use to assign values to the the data members of the Phone object for that contact?
| a. |
contact.phone.area_code = 555; |
|
| b. |
Phone phone; |
|
| c. |
Phone phone; |
|
| d. |
Phone phone; |
1.5 points
QUESTION 66
What is the easiest way to deploy a C++ program to a user’s computer?
| a. |
Copy the executable file to the user’s computer |
|
| b. |
Create a batch file that copies the program to the user’s computer and then run it |
|
| c. |
Create an installer program and then run it on the user’s computer |
|
| d. |
Copy the source code to the user’s computer and then compile it |
1.5 points
QUESTION 67
Which of the following statements is not true about structures?
| a. |
They include data members that must be fundamental data types. |
|
| b. |
They can include member functions that operate on the data members. |
|
| c. |
They define a data type. |
|
| d. |
They are typically used to organize related data. |
1.5 points
QUESTION 68
When you dereference an iterator, you get the value of the element that the iterator points to
True
False
1 points
QUESTION 69
A stack container provides last-in, first-out access
True
False
1 points
QUESTION 70
A deque container is a fixed-size collection of elements that’s stored in contiguous memory
True
False
In: Computer Science
we are talking about the mc68000 microprocessor
a) Explain possible scenarios that would set the V bit of the Status Register in signed number arithmetic operations b) Name 3 Internal Bus and explain their usage and functionality in a microcontroller c) Explain how the displacement is calculated and how the PC gets updated when branching to a subroutine using BSR instruction d) Why do we use MOVEQ or ADDQ instead of MOVE or ADD instruction? (Explain with an example)
In: Computer Science