Questions
A researcher wanted to know if a particular brand was preferred by different age groups. The...

A researcher wanted to know if a particular brand was preferred by different age groups. The researcher observed the data below. Is there a relationship between age and brand?

Brand A

Brand B

Brand C

Under 30

120

130

110

30 – 50

77

127

140

50 and older

84

100

98

  1. Which test are you using?
  2. What are your H0 (null hypothesis) and Ha (alternative hypothesis)?
  3. Calculate your statistic.
  4. What decision does this inform you to make and why? (You may use the critical value in the chart or the calculated p-value, but you must indicate what you are doing.)
  5. Write a one to two sentence conclusion that correctly responds to the question.

Please use only  Chi-Squared test

In: Statistics and Probability

6. The worst case scenario in the quick sort occurs when the array is partitioned to...

6. The worst case scenario in the quick sort occurs when the array is partitioned to two equal sized subarray every time that a recursive call takes place.

True

False

7.Suppose that we want to sort an array of n elements, where each element is a string of at most 1000 characters. What is the time requirement for applying radix sort to sort this array?

O(n2)

O(1000n)

O(l000logn)

O(nlogn)

8.Suppose we want to sort the following array of integers using radix sort:

a=[14 682 120 50 327]

What are the intermediate steps?

pass1: 14 682 120 50 327

pass2: 14 50 120 682 327

pass3: 14 50 120 327 682

pass1: 14 682 120 50 327

pass2: 14 120 682 50 327

pass3: 14 50 120 682 327

pass4:14 50 120 327 680

pass1: 14 50 120 327 682

pass1: 120 50 682 14 327

pass2: 14 120 327 50 682

pass3: 14 50 120 327 682

9.What are the intermediate steps for patitioning the folloiwng array when taking the pivot as the median of the first,middle, and last items (suppse that the threshold for calling insertion sort is an array of size 2)

a= [12 5 8 6 9 11 10 ]

[6 5 8 10 9 11 12]

[6 5 8 11 9 10 12]

[6 5 8 9 11 10 12]

[6 5 8 9 10 11 12]

[12 5 8 11 9 6 10 ]

[5 12 8 11 9 6 10]

[5 6 12 8 11 9 10]

[12 11 8 6 9 5 10 ]

[5 11 8 6 9 12 10]

[12 5 8 6 11 9 10 ]

[6 5 8 12 11 9 10]

[6 5 8 9 11 12 10]

10.Although radix sort has the best time efficiency among other sorting algorithm it is not always applicable because it imposes some restrictions on the type of the data that can be sorted.

True

False

In: Computer Science

1.MCGG is Australian MNC that exports cricket equipment to Asia. MCGG has exposure to both the...

1.MCGG is Australian MNC that exports cricket equipment to Asia. MCGG has exposure to both the Indian Rupee (INR) and the Pakistani Rupee (PKR). 60% of the MCGG's funds are INR and 40% are PKR. The standard deviation of exchange movements is 7% for INR and 8% for PKR. Correlation coefficient for the two currencies is 0.50. Based on this information, the standard deviation of these two-currency portfolio is

A.

0.0643

B.

0.0623

C.

0.0586

D.

0.0485

E.

0.0356

2.The interest rate in the Sri Lanka is 12.5%. The interest rate in the Australia is 1.5%. The spot rate for the Sri Lankan Rupee is A$0.0082. According to the international Fisher effect (IFE), the Sri Lankan Rupee should adjust to a new level of:

A.

A$0.0074.

B.

A$0.0083.

C.

A$0.0092.

D.

A$0.0091.

E.

A$0.0082.

3.A bank has quoted the following exchange rates: A$1.21/US$ and €0.60/A$. Which of the following is a correct cross-rate for the above rates?

A.

US$0.7260 / €

B.

US$1.3774 / €

C.

€1.3774 / US$

D.

€2.0167 / US$

E.

None of the options.

4.The FX dealer has two quotes. The exchange rate between Sri Lankan Rupee and the Australian dollar is Rs.120 / A$. The exchange rate between Myanmar Kyat and the Australian dollar is MMK895 / A$. Assume that the Australian dollar is the home currency. What is the exchange rate between the two foreign currencies?

A.

Rs. 7.458 / MMK.

B.

Rs. 7.845 / MMK.

C.

Rs. 0.134 / MMK.

D.

Rs. 0.127 / MMK.

E.

none of the above.

5.The 60-day period lending rate for the Mexican Peso (MXN) is 0.80 percent and the 60-day period borrowing rate for the Australian dollars (A$) is 1.05 percent. Delta bank expects the exchange rate of the MXN to appreciate from its current level of A$0.063 to A$0.070 in 60 days. Assume that Delta can borrow A$ 1,000,000.

If the MXN appreciates to A$0.07 in 60 days as expected, what is Delta’s profit in Australian dollars?

A.

A$ 1,578,096

B.

A$ 114,778

C.

- A$ 2500

D.

A$ 110,467

E.

A$ 109,500

In: Finance

Write a program to compute numeric grades for a course. The course records are in a...

Write a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format:


Each line contains a student’s last name, then one space, followed by the student’s first name, then one space, then ten or fewer quiz scores.


(If there are fewer than ten scores, that means the student missed one or more quizzes.) The quiz scores are whole numbers and are separated by one space. Your program will take its input from this file and send its output to a second file. The data in the output file will be the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student’s quiz scores. The average score is the sum of the quiz scores divided by 10. This amounts to giving the student a 0 for any missed quiz.


The output file will contain a line (or lines) at the beginning of the file explaining the output. Use formatting instructions to make the layout neat and easy to read.


After placing the desired output in an output file, your program will close all files and then copy the contents of the output file to the input file so that the net effect is to change the contents of the input file.


Use at least two functions that have file streams as all of some of their arguments.

Hint: Check out putback member function. See topic in Files menu.

SAMPLE OUTPUT


Input file:

test_ line_ 10 20 30 40 50 60 70

Price Betty 40 50 60 70 60 50 30 60 90

Goodman John 60 70 80 90 100 90

Smith Charles 70 80 90 60 70 60 80 90 90 90

Spangenberg Ward 70 70 80 90 70 80 90 80 70 60

Output file:

Last Name, First Name, up to 10 quiz scores. last entry is the average.

test_ line_ 10 20 30 40 50 60 70 28.00

Price Betty 40 50 60 70 60 50 30 60 90 51.00

Goodman John 60 70 80 90 100 90 49.00

Smith Charles 70 80 90 60 70 60 80 90 90 90 78.00

Spangenberg Ward 70 70 80 90 70 80 90 80 70 60 76.00


Point Distribution:
-50 Does not compile
-5 Warnings
-5 No description multiple line comments (name, date, etc)
-5 No single line comments (logic, input, output, etc)
-20 Does not use at least 2 programmer defined functions with stream passing.
-10 Does not copy output file to input file
-10 Does not format output


can you please send the answer to my emil [email protected]

thank you

C++

C++

In: Computer Science

( PARTS 5-8 Only ) 1.Generate a scatter plot for CREDIT BALANCE vs. SIZE, including the...

( PARTS 5-8 Only )

1.Generate a scatter plot for CREDIT BALANCE vs. SIZE, including the graph of the "best fit" line. Interpret.

2.Determine the equation of the "best fit" line, which describes the relationship between CREDIT BALANCE and SIZE. Interpret the values for slope and intercept.

3.Determine the coefficient of correlation. Interpret.

4.Determine the coefficient of determination. Interpret.

5. Test the utility of this regression model (use a two tail test with α=.05) by setting up the appropriate test of hypothesis. Interpret your results, including the p-value.

6. Based on your findings in 1-5, what is your opinion about using SIZE to predict CREDIT BALANCE? Explain.

7.Compute the 98% confidence interval for β1 (the population slope). Interpret this interval.

8. What can we say about the credit balance for a customer that has a household size of 9 ? Explain your answer.

Location Income
($1000)
Size Years Credit
Balance ($)
Urban 54 3 12 4,016
Rural 30 2 12 3,159
Suburban 32 4 17 5,100
Suburban 50 5 14 4,742
Rural 31 2 4 1,864
Urban 55 2 9 4,070
Rural 37 1 20 2,731
Urban 40 2 7 3,348
Suburban 66 4 10 4,764
Urban 51 3 16 4,110
Urban 25 3 11 4,208
Urban 48 4 16 4,219
Rural 27 1 19 2,477
Rural 33 2 12 2,514
Urban 65 3 12 4,214
Suburban 63 4 13 4,965
Urban 55 6 15 4,412
Urban 21 2 18 2,448
Rural 44 1 7 2,995
Urban 37 5 5 4,171
Suburban 62 6 13 5,678
Urban 21 3 16 3,623
Suburban 55 7 15 5,301
Rural 42 2 19 3,020
Urban 41 7 18 4,828
Suburban 54 6 14 5,573
Rural 30 1 14 2,583
Urban 48 2 8 3,866
Urban 34 5 5 3,586
Suburban 67 4 13 5,037
Rural 50 2 11 3,605
Urban 67 5 1 5,345
Urban 55 6 10 5,370
Urban 52 2 11 3,890
Urban 62 3 2 4,705
Urban 64 2 6 4,157
Suburban 22 3 18 3,899
Urban 29 4 4 3,890
Suburban 39 2 18 2,972
Rural 35 1 11 3,121
Urban 39 4 15 4,183
Suburban 54 3 9 3,730
Suburban 23 6 18 4,127
Rural 27 2 1 2,921
Urban 26 7 17 4,603
Suburban 61 2 14 4,273
Rural 30 2 14 3,067
Rural 22 4 16 3,074
Suburban 46 5 13 4,820
Suburban 66 4 20 5,149
Rural 53 1 7 2845
Urban 44 6 5 3962
Suburban 74 7 12 5394
Urban 25 3 15 3442
Suburban 66 7 14 5036

In: Statistics and Probability

Mr. and Mrs. Z, both in their late 30s, file a joint tax return. They have...

Mr. and Mrs. Z, both in their late 30s, file a joint tax return. They have one dependent child who is age 5. Mr. Z is an employee with wages = $100,000. Federal tax withholding from his paycheck = $16,000. Their itemized deductions = $30,000. Any preferential tax rate = 0%. Allowable adjustment for retirement account = $5,000. Mrs. Z runs a part-time business that she operates as a sole proprietor. This year’s information is as follows:

Revenue $30,000, Cost of Goods Sold, $16,000, Other Expenses = $4,500 (including cost recovery = $800 and entertainment of clients = $500). She sold some business assets, one for a gain of $1,000, all of which is subject to depreciation recapture, and the others for a net loss of $1,500.

Mr. and Mrs. Z have some investments. This year they received $3,000 from an investment in bonds issued by the state of Alabama. They also sold two stocks they had held for several years, one for a gain of $6,000 and one for a loss of $4,000.

Calculate Mr. and Mrs. Z’s adjusted gross income (AGI), taxable income, total tax liability, and amount due or refund

can you include the QBI and self employment too

In: Accounting

Kathleen is a 1.68 m, 59 kg, 20-year-old university student. Over the last few years she...

Kathleen is a 1.68 m, 59 kg, 20-year-old university student. Over the last few years she has gained, then lost, five to seven kilograms several times. Recently, she has been trying hard to keep her weight down. Like many university students, Kathleen goes out every weekend and tends to overindulge. During the week she lives the life of a serious student, eating very little and getting seven to eight hours of sleep every night. By Friday, she is ready to have some fun. She usually goes out with friends to a nearby Chinese or Thai restaurant and then out to a bar or club. At the bar Kathleen will have four or five drinks and munch on hot chips or salted nuts. By 3 a.m., when she and her friends are ready to call it a night, they are usually hungry again. This means finding pizza, burgers or any other food they can find at that hour of the morning. After a late night out, Saturdays are spent catching up on some sorely needed sleep. By Saturday night, Kathleen is ready to go out and do it all over again. Sundays are usually spent relaxing at a hearty Sunday brunch, watching movies with her friends accompanied by a giant bowl of popcorn, and finishing homework that is due on Monday morning.

Kathleen realises that her weekend binges may cause her to gain weight, so she cuts down on kilojoules from Monday to Thursday. Kathleen has been trying to stay active and build up some muscle mass by running. Recently, her strict dieting is making this more difficult. During the week Kathleen eats so little that she often feels weak or lightheaded, especially following her long-distance runs. Although she is running a great deal, her muscles are not getting as large as she had hoped they would. She finds her diet is very hard to stick to on Mondays and Tuesdays. Kathleen is always starving. However, by the end of the week she no longer feels so hungry. Kathleen also notices that she has a much harder time paying attention, is sensitive to the cold temperatures and finds it all too easy to catch a cold or flu.

1. During periods of feasting, how are metabolic fuels used differently compared to their use with a healthy, consistent diet?

2. What are the long-term consequences of Kathleen's eating pattern and alcohol consumption on her vitamin status?

In: Anatomy and Physiology

please use R for solving the questions (e) Is multicollinearity a potential problem in this model?...

please use R for solving the questions

(e) Is multicollinearity a potential problem in this model?

(f) Construct a normal regression plot of residuals. Does there seem to be any problem with the normality assumption?

(g) Construct and interpret a plot of the residuals versus predicted response.

(h) Based on the above analysis, what is your recommended model?

[Hint: Use the lm commend in R to fit a regression equation.

Table B.4

y x1 x2 x3 x4 x5 x6 x7 x8 x9
29.5 5.0208 1 3.531 1.5 2 7 4 62 0
27.9 4.5429 1 2.275 1.175 1 6 3 40 0
25.9 4.5573 1 4.05 1.232 1 6 3 54 0
29.9 5.0597 1 4.455 1.121 1 6 3 42 0
29.9 3.891 1 4.455 0.988 1 6 3 56 0
30.9 5.898 1 5.85 1.24 1 7 3 51 1
28.9 5.6039 1 9.52 1.501 0 6 3 32 0
35.9 5.8282 1 6.435 1.225 2 6 3 32 0
31.5 5.3003 1 4.9883 1.552 1 6 3 30 0
31 6.2712 1 5.52 0.975 1 5 2 30 0
30.9 5.9592 1 6.666 1.121 2 6 3 32 0
30 5.05 1 5 1.02 0 5 2 46 1
36.9 8.2464 1.5 5.15 1.664 2 8 4 50 0
41.9 6.6969 1.5 6.902 1.488 1.5 7 3 22 1
40.5 7.7841 1.5 7.102 1.376 1 6 3 17 0
43.9 9.0384 1 7.8 1.5 1.5 7 3 23 0
37.5 5.9894 1 5.52 1.256 2 6 3 40 1
37.9 7.5422 1.5 5 1.69 1 6 3 22 0
44.5 8.7951 1.5 9.89 1.82 2 8 4 50 1
37.9 6.0831 1.5 6.7265 1.652 1 6 3 44 0
38.9 8.3607 1.5 9.15 1.777 2 8 4 48 1
36.9 8.14 1 8 1.504 2 7 3 3 0
45.8 9.1416 1.5 7.3262 1.831 1.5 8 4 31 0
25.9 4.9176 1 3.472 0.998 1 7 4 42 0

In: Statistics and Probability

A company that uses the gross method of recording purchases and a perpetual inventory system made...

A company that uses the gross method of recording purchases and a perpetual inventory system made a purchase of $2,200 with terms of 2/10, n/30. The entry to record the purchase would be:

Debit Merchandise Inventory $2,156; credit Accounts Payable $2,156. Debit Merchandise Inventory $2,200; credit Accounts Payable $2,200. Debit Merchandise Inventory $2,156; credit Cash for $2,156. Debit Merchandise Inventory $2,156; debit Discounts Lost $44; credit Accounts Payable $2,200. Debit Accounts Payable $2,200; credit Discounts Lost $44; credit Cash $2,156.

In: Finance

(10 pts) A firm has the following short run total costs, where Q is output and...

  1. (10 pts) A firm has the following short run total costs, where Q is output and TC is total cost:

Q

TC

0

$ 100

1

110

2

130

3

160

4

200

5

250

6

310

7

380

8

460

9

550

10

650

11

760

  1. What is total fixed cost equal to? $100

  1. What is average total cost at Q = 4? $50

  1. What is average variable cost at Q = 7? $40

  1. What is marginal cost at Q = 8?

  1. At Q=8, is the firm operating under increasing or decreasing returns? Why?

  1. (6 pts) An economy has the following total transactions (or total requirements) input-output matrix:

                                             Agriculture    Manufact.   Energy    Services

Agriculture                               1.40                0.30         0.40         0.40

Manufacturing                         0.40                1.50         0.50          0.60

Energy                                      0.30                0.60        1.20           0.40

Services                                    0.40                0.50        0.40           1.30

  1. If final demand for manufacturing increases by $ 50 billion, what will be the increase in total production in each industry? In the economy as a whole?
  1. Calculate the industry multiplier for services.  
  1. (2 pts) A firm is producing a product using only labor and physical capital. The price of labor (wage rate) is $ 20/hour, and the cost of capital is $ 60/hour. If the marginal product of labor is 300 units an hour, what must be the marginal product of capital if the firm is a profit maximizer?      
  1. (2 pts) A firm has the following production function, where Q is output, K is capital and L is labor:

Q = 400K0.5L0.7

Does this firm operate under increasing, decreasing or constant returns to scale, and why?

In: Economics