Questions
USING R TO ANSWER QUESTION: Performance Tires plans to engage in direct mail advertising. It is...

USING R TO ANSWER QUESTION: Performance Tires plans to engage in direct mail advertising. It is currently in negotiations to purchase a mailing list of the names of people who bought sports cars within the last three years. The owner of the mailing list claims that sales generated by contacting names on the list will more than pay for the cost of using the list. (Typically, a company will not sell its list of contacts, but rather provides the mailing services. For example, the owner of the list would handle addressing and mailing catalogs.) Before it is willing to pay the asking price of $3 per name, the company obtains a sample of 225 names and addresses from the list in order to run a small experiment. It sends a promotional mailing to each of these customers. The data for this exercise show the gross dollar value of the orders produced by this experimental mailing. The company makes a profit of 20% of the gross dollar value of a sale. For example, an order for $100 produces $20 in profit.

c. Describe the appropriate hypotheses and type of test to use. Choose (and justify) an alpha-level for the test. Check whether the sample size condition and the random sample condition are met.

d. Summarize the results of the sample mailing. Use a histogram and appropriate numerical statistics.

e. Summarize the results of the test. Make a recommendation to the management of Performance Tires

173.08

0

0

0

0

156.84

0

136.57

303.15

0

0

0

0

0

0

0

200.49

0

0

0

0

0

0

0

0

0

0

0

In: Statistics and Probability

Modify the Movie List 2D program -Modify the program so it contains four columns: name, year,...

Modify the Movie List 2D program

-Modify the program so it contains four columns: name, year, price and rating (G,PG,R…)

-Enhance the program so it provides a find by rating function that lists all of the movies that have a specified rating

def list(movie_list):
if len(movie_list) == 0:
print("There are no movies in the list.\n")
return
else:
i = 1
for row in movie_list:
print(str(i) + ". " + row[0] + " (" + str(row[1]) + ")")
i += 1
print()

def add(movie_list):
name = input("Name: ")
year = input("Year: ")
movie = []
movie.append(name)
movie.append(year)
movie_list.append(movie)
print(movie[0] + " was added.\n")   

def delete(movie_list):
number = int(input("Number: "))
if number < 1 or number > len(movie_list):
print("Invalid movie number.\n")
else:
movie = movie_list.pop(number-1)
print(movie[0] + " was deleted.\n")
  
def display_menu():
print("COMMAND MENU")
print("list - List all movies")
print("add - Add a movie")
print("del - Delete a movie")
print("exit - Exit program")
print()

def main():
movie_list = [["Monty Python and the Holy Grail", 1975],
["On the Waterfront", 1954],
["Cat on a Hot Tin Roof", 1958]]

display_menu()
  
while True:
command = input("Command: ")
if command == "list":
list(movie_list)
elif command == "add":
add(movie_list)
elif command == "del":
delete(movie_list)
elif command == "exit":
break
else:
print("Not a valid command. Please try again.\n")
print("Bye!")

if __name__ == "__main__":
main()

In: Computer Science

1. An array has an index of [5] at the starting address of 200. It has...

1. An array has an index of [5] at the starting address of 200. It has 3 words per memory cell, determine loc[3],loc[4] and NE. (3 Marks: 1 mark for each)

2. A 2-D array defined as A[10 , 5] requires 4 words of storage space for each element. Calculate the address of A[4,3] given the base address as 250 • If the array is stored in Row-major form • If the array is stored in Column-major form

3. Write a method for the following using the data structure Linked List. void append(Node list1, Node list2) If the list1 is {22, 33, 44, 55} and list2 is {66, 77, 88, 99} then append(list1, list2) will change list1 to {22, 33, 44, 55, 66, 77, 88, 99}. (5 Marks: 1mark for each correct step)

4. Write a method for the following using the data structure Linked List. int sum(Node list) If the list is {25, 45, 65, 85} then sum(list) will return 220. (5 Marks: 1mark for each correct step)

5. Trace the following code showing the contents of the Linked List L after each call L.add(50); L.add(60); L.addFirst(10); L.addLast(100); L.set(1, 20); L.remove(1); L.remove(2); L.removeFirst(); L.removeLast(); (10 Marks: 1 mark for each correct answer) L.addFirst(10);

6. Compare and contrast the following data structures. • Array and Linked List

In: Computer Science

Can someone please convert this java code to C code? import java.util.LinkedList; import java.util.List; public class...

Can someone please convert this java code to C code?

import java.util.LinkedList;
import java.util.List;
public class Phase1 {
/* Translates the MAL instruction to 1-3 TAL instructions
* and returns the TAL instructions in a list
*
* mals: input program as a list of Instruction objects
*
* returns a list of TAL instructions (should be same size or longer than input list)
*/
public static List<Instruction> temp = new LinkedList<>();
public static List<Instruction> mal_to_tal(List<Instruction> mals) {
for (int i = 0; i < mals.size(); i++) {
Instruction current = mals.get(i);
int rs = current.rs;
int rd = current.rd;
int rt = current.rt;
int imm = current.immediate;
int jumpAddress = current.jump_address;
int shiftAmount = current.shift_amount;
String label = current.label;
String branchLabel = current.branch_label;
int upperImm = imm >>> 16;
int lowerImm = imm & 0xFFFF;
int t1 = 0;
int t2 = 0;
int t3 = 0;
int at = 0;
if ((current.instruction_id == Instruction.ID.addiu
|| current.instruction_id == Instruction.ID.ori) && (imm > 65535)) {
at = 1;
temp.add(InstructionFactory.CreateLui(at, upperImm, label));
temp.add(InstructionFactory.CreateOri(at, at, lowerImm));
if (current.instruction_id == Instruction.ID.addiu) temp.add(InstructionFactory.CreateAddu(rt, rs, at));
else temp.add(InstructionFactory.CreateOr(rt, rs, at));
}
else if (current.instruction_id == Instruction.ID.blt) {
//t1 = rt, t2 = rs
if (rt > rs) {
at = 1;
}
temp.add(InstructionFactory.CreateSlt(at, rt, rs));
temp.add(InstructionFactory.CreateBne(at, 0, branchLabel));
}
else if (current.instruction_id == Instruction.ID.bge) {
at = 1;
temp.add(InstructionFactory.CreateSlt(at, rt, rs));
temp.add(InstructionFactory.CreateBeq(at,0, branchLabel));
}
else temp.add(current);
}
return temp;
}

}

to C code:

void mal_to_tal(structArrayList *mals, structArrayList *tals) {

}

In: Computer Science

Using basic Python 2. Given the following dictionary: speed ={'jan':47, 'feb':52, 'march':47, 'April':44, 'May':52, 'June':53, 'july':54,...

Using basic Python

2. Given the following dictionary:

speed ={'jan':47, 'feb':52, 'march':47, 'April':44, 'May':52, 'June':53, 'july':54, 'Aug':44, 'Sept':54}

Get all values from the dictionary and add it to a new list called speedList, but don’t add duplicates values to the new list.

Your code should print out:

speedList [47, 52, 44, 53, 54]

3. Given the following list of numbers:

numberList = [10, 20, 33, 46, 55, 61, 70, 88, 95]

First iterate the list and print only those numbers, which are divisible of 5. Then iterate the list and print only those numbers that are odd.

Your code should print out:

Numbers from numberList that are only divisible of 5 are:

10

20

55

70

95

Numbers from numList that are odd are:

33

55

61

95

4. For the given list:

item_list= [ 2, 6, 13, 17, 22, 25, 29, 31, 38, 42, 47, 55, 59, 63, 68, 71, 77, 84, 86, 90, 99]

Write python code to do a binary search over the given list, where the search value is input by a user (positive integers from 1 to 100 only). Print out the results if the search found the number or not.

HINT: Our author provided the pseudocode in Figure 3.18 from Chapter 3 of our text for solving this problem.

In: Computer Science

An array has an index of [5] at the starting address of 200. It has 3...

  1. An array has an index of [5] at the starting address of 200. It has 3 words per memory cell, determine loc[3],loc[4] and NE. (3 Marks: 1 mark for each)

  1. A 2-D array defined as A[10 , 5] requires 4 words of storage space for each element. Calculate the address of A[4,3] given the base address as 250
  • If the array is stored in Row-major form
  • If the array is stored in Column-major form

  1. Write a method for the following using the data structure Linked List.

void append(Node list1, Node list2)

       If the list1 is {22, 33, 44, 55} and list2 is {66, 77, 88, 99} then append(list1, list2) will change list1 to {22, 33, 44, 55, 66, 77, 88, 99}.   (5 Marks: 1mark for each correct step)

  1. Write a method for the following using the data structure Linked List.

int sum(Node list)

     If the list is {25, 45, 65, 85} then sum(list) will return 220.    (5 Marks: 1mark for each correct step)

                                                          

  1. Trace the following code showing the contents of the Linked List L after each call

      L.add(50);

      L.add(60);

      L.addFirst(10);

      L.addLast(100);

      L.set(1, 20);

      L.remove(1);

      L.remove(2);

      L.removeFirst();

      L.removeLast();    (10 Marks: 1 mark for each correct answer)

      L.addFirst(10);

  1. Compare and contrast the following data structures.
  • Array and Linked List

In: Computer Science

An array has an index of [5] at the starting address of 200. It has 3...

  1. An array has an index of [5] at the starting address of 200. It has 3 words per memory cell, determine loc[3],loc[4] and NE. (3 Marks: 1 mark for each)

  1. A 2-D array defined as A[10 , 5] requires 4 words of storage space for each element. Calculate the address of A[4,3] given the base address as 250
  • If the array is stored in Row-major form
  • If the array is stored in Column-major form

  1. Write a method for the following using the data structure Linked List.

void append(Node list1, Node list2)

       If the list1 is {22, 33, 44, 55} and list2 is {66, 77, 88, 99} then append(list1, list2) will change list1 to {22, 33, 44, 55, 66, 77, 88, 99}.   (5 Marks: 1mark for each correct step)

  1. Write a method for the following using the data structure Linked List.

int sum(Node list)

     If the list is {25, 45, 65, 85} then sum(list) will return 220.    (5 Marks: 1mark for each correct step)

                                                          

  1. Trace the following code showing the contents of the Linked List L after each call

      L.add(50);

      L.add(60);

      L.addFirst(10);

      L.addLast(100);

      L.set(1, 20);

      L.remove(1);

      L.remove(2);

      L.removeFirst();

      L.removeLast();    (10 Marks: 1 mark for each correct answer)

      L.addFirst(10);

  1. Compare and contrast the following data structures.

Array and Linked List

In: Computer Science

1. For each the following questions, Define the appropriate parameter(s) State ?! and ?! Choose the...

1. For each the following questions,

  • Define the appropriate parameter(s)

  • State ?! and ?!

  • Choose the correct model from the following list:

    1. Test for a single mean

    2. Test for a single proportion

    3. Test for two means, independent samples

    4. Test for mean difference, dependent sampling

    5. Test for two proportions, independent samples

  1. You want to support the claim that male bass singers are taller than male tenor singers. Parameter(s):

    Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  2. You want to reject the claim that no more than 10% of students will suffer financial hardship if tuition

    increased. Parameter(s):

    Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  3. You want to support the claim that people spend, on average, more time on the Internet than they do

    watching television. 200 people will be asked how much time they spent on the TV and on the Internet. Parameter(s):

    Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  4. You want to test the claim that the average age for a community college student is over 27. You want to

    support this claim and sample 20 students. Parameter(s):

    Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  5. Is there a difference in mean overall quality of tomatoes bought at farmers markets versus at grocery

stores? Tomatoes are purchased at 30 randomly selected farmers markets and 40 randomly selected high- end grocers. Their mean overall quality is compared.

Parameter(s):

Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  1. A hospital surgery review board wants to determine if the proportion of patients undergoing a particular surgery who are cured is greater than the proportion that are cured by the current non-surgical standard treatment.

    Parameter(s):

    Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  2. A higher education centered non-profit organization wants to determine if the percentage of entering

    freshmen that graduate is lower at a public university than at a private college. Parameter(s):

    Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  3. Does the home team have an advantage in NBA basketball games? In a study of 25 games, the visiting

    team’s points were compared to the home team’s points. Parameter(s):

    Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

  4. A hypothesis test is performed to determine if recent female college graduates are subject to pay discrimination, earning less on average for similar work than recent male college graduates with similar qualifications.

    Parameter(s):

Hypotheses: ?!: __________________ ?!: __________________ Model to use: ______

In: Math

XI: Technology and EHR in Community Health Students will identify the process used to handle client...

XI: Technology and EHR in Community Health

Students will identify the process used to handle client information and maintain confidentiality and health information sharing within and between agencies and governing bodies.

In: Nursing

How to explain to introductory business students: “the topic of the macroeconomic business cycle, how government...

How to explain to introductory business students:

“the topic of the macroeconomic business cycle, how government policies and business strategies are used to combat the cycle (government) and how to compete successfully (business)”

In: Economics