Question

In: Statistics and Probability

Consider the following table. > addmargins(table(mpg$drv,mpg$class)) 2seater compact midsize minivan pickup subcompact suv Sum 4 0...

Consider the following table.
> addmargins(table(mpg$drv,mpg$class))

2seater compact midsize minivan pickup subcompact suv Sum
4 0 12 3 0 33 4 51 103
f 0 35 38 11 0 22 0 106
r 5 0 0 0 0 9 11 25
Sum 5 47 41 11 33 35 62 234
while 38 of the 41 midsize vehicles have front wheel drive. We wish
the test that the proportion of front wheel drive cars is the same in

We see that 35 of the 47 compact vehicles have front wheel drive

compact and midsize vehicles. Formally, we will test H0 : pc = pm vs
Ha : pc 6= pm, where pc and pm are the proportion of front wheel drive cars in compacts and midsize cars. We will test at the 5% significance
level. You may assume that the normal approximation is appropriate
for these problems.

Using prop.test, what is a 95% confidence  interval for pc - pm?
{ a) (0.12, 0.46)
{ b) (-0.57, -0.21)
{ c) (-0.14, 0.58)
{ d) (-0.35, -0.01)

Using prop.test, what is the p value for the test?
{ a) 0.183
{ b) 0.004
{ c) 0.047
{ d) 0.143

Based on the p value, do we reject H0?
(a) yes

(b) no

(c) not enough info to decide



Solutions

Expert Solution

we are given the values of total mid-size vehicles, compact size vehicles that have front-wheel drive.

to be Precise, 35 of the 47 compact vehicles have front-wheel drive and 38 of the 41 mid-size vehicles have front-wheel drive.

therefore, n1= 47,n2 = 41 and X1 = 35 and X2 = 38 .

therefore in the Question, we are asked to find the Values using Prop.test

prop.test can be used in r

the Hypothesis is

H0 : pc = pm

vs

H1: pc pm

therefore, using prop.test in R.

the Syntax is as follows :

prop_test=prop.test(x=c(35,38), n=c(47,41))

prop_test

the Output is as follows:

2-sample test for equality of proportions with
   continuity correction

data: c(35, 38) out of c(47, 41)
X-squared = 3.9306, df = 1, p-value = 0.04741
alternative hypothesis: two.sided
95 percent confidence interval:
-0.35294827 -0.01134857
sample estimates:
prop 1 prop 2
0.7446809 0.9268293

continuity correction is assumed since we are told that we can use Normal approximation.

q.1.

from the Output, we can see the 95 % confidence interval to be (-0.3529, -0.011)

which corresponds to Option D.

q.2.

the Output also shows the P-value.

the P-value is 0.04741.

which Corresponds to Option C.

q.3.

we have used 0.05 level of significance, therefore L.O.S = 0.05.

the Decision Criterion is

Rej H0 at 5% L.O.S if P-value < L.O.S.

Conclusion :

Since 0.047 < 0.05 , we reject H0 .

which corresponds to option A.


Related Solutions

4) Consider total cost and total revenue given in the following table: Quantity 0 1 2...
4) Consider total cost and total revenue given in the following table: Quantity 0 1 2 3 4 5 6 7 7 Total Cost $120 150 160 170 190 230 300 410 610 Total Revenue $0 70 140 210 280 350 420 490 560 A. Create a table that includes the fixed cost at each level of output as well as the variable cost at each level of output. If capital is fixed and the firm uses 10 units of...
For the following exercises, express each description of a sum using summation notation. The sum from of n = 0 to n = 4 of 5n
For the following exercises, express each description of a sum using summation notation.The sum from of n = 0 to n = 4 of 5n
Consider the following table:         Labor Output Marginal Product     0 0 ? 10 100 ? 20...
Consider the following table:         Labor Output Marginal Product     0 0 ? 10 100 ? 20 180 ? 30 240 ? 40 280 ? Based on the table above, if labor increases from 20 to 30, then marginal product of the 30th worker is: 10 8 6 4 2 points    QUESTION 2 Suppose the long run production function is given by: Q = 4*L +2K2. Marginal product of labor (MPL) = 4 and wage is $10. Marginal product of...
A SAMPLE consists of the following: N=3 scores: 0, 4, 12 Find M (mean), SS (sum...
A SAMPLE consists of the following: N=3 scores: 0, 4, 12 Find M (mean), SS (sum of squares), s2 (variance), and s (standard deviation) Find the z scores for each score in the sample Transform the original sample into a new sample with a mean of M= 50, and s=10
Consider the following page reference string: 0, 1, 2, 3, 1, 0, 4, 5, 1, 0,...
Consider the following page reference string: 0, 1, 2, 3, 1, 0, 4, 5, 1, 0, 1, 2, 6, 5, 2, 1, 0, 1, 2, 5 How many page faults would occur for the following replacement algorithms, assuming one, three, five, and seven frames? Remember that all frames are initially empty, so your first unique pages will cost one fault each. Optimal replacement LRU replacement CLOCK replacement FIFO replacement
8. Consider the daily prices of a stock as per the following table. Time Price 0...
8. Consider the daily prices of a stock as per the following table. Time Price 0 100 1 110 2 90 3 95 4 105 The volatility per day is ______________. The volatility per annum is ______________.
Exercise 14-4 Algo Consider the following competing hypotheses: H0: ρxy ≥ 0 HA: ρxy < 0...
Exercise 14-4 Algo Consider the following competing hypotheses: H0: ρxy ≥ 0 HA: ρxy < 0 The sample consists of 34 observations and the sample correlation coefficient is –0.58. Use Table 2. a. Calculate the value of the test statistic. (Negative value should be indicated by a minus sign. Round intermediate calculations to at least 4 decimal places and final answer to 2 decimal places.) Test statistic b. Approximate the p-value. p-value < 0.005 0.005 < p-value < 0.01 0.01...
Problems 3, 4 and 5 refer to the following alternatives on the table below Consider the...
Problems 3, 4 and 5 refer to the following alternatives on the table below Consider the following alternatives that have a ten-year useful life. The MARR is 10% Alternatives A B C A B C Initial Cost 800 300 150 Uniform Annual Benefit (s) 142 60 33.5 3. Based on Benefit-Cost ratio analysis, the alternative to be selected is (A)    Alternative A (B)    Alternative B (C)    Alternative C (D)   No Alternative 4. Based on Payback Period, the alternative to select is (A)    Alternative A (B)    Alternative...
Consider the following definition of a doubly linked-list: class LinkedList{ public: LinkedList():head(0), tail(0){} ~LinkedList(); void reverse();...
Consider the following definition of a doubly linked-list: class LinkedList{ public: LinkedList():head(0), tail(0){} ~LinkedList(); void reverse(); //reverses the order of elements in the linked list void insert(int value); private: struct Node{ int data; Node* next; Node* prev; }; Node* head; Node* tail; //Add your helper function here that recursively reverses the order of elements in the linked list }; Write the declaration of a helper function in the class provided above that recursively reverses the order of elements in the...
Consider the following sum (which is in expanded form): 1−4 + 7−10 + 13−16 + 19−22...
Consider the following sum (which is in expanded form): 1−4 + 7−10 + 13−16 + 19−22 +···±(3n−2). Note that this is slightly different from the previous sum in that every other term is negative. (a) Write it as a summation (∑). (b) Evaluate the sum for every integer n from 1 to 9. (Be careful - if you get this wrong, you will likely get the rest of this question wrong!) (c) Write a closed-form formula for the value of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT