1 answer

Use R 1. A light bulb manufacturer claims their light bulbs as for 1,000 hours. You...

Question:

1. A light bulb manufacturer claims their light bulbs as for 1,000 hours. You sample 50 light bulbs and you find that the sam
3. Now we will see how the sample average impacts the p-value Create a vector, called xbar, of different observe increment
S. Now well do power analysis for question I For the hypothesis Ho 1,000 vs. Ha: μ < 1,000, with n 50, χz 955, σ 220, with
Use R
1. A light bulb manufacturer claims their light bulbs as for 1,000 hours. You sample 50 light bulbs and you find that the sample average light bulb lifetime duration is 955 hours. Assume that you know the population standard deviation, and that it is 220 hours. That is n 50、 x"= 955, σ = 220 Test the null hypothesis Ho: μ-1,000 against the alternative hypothesis Ha: μ < 1,000 at the 0.05 significance level a. Calculate the critical statistic using the qnorm function. Compare this to the test statistic, found using the sample information. Do you reject, or fail to reject the nul hypothesis? Find the p-value associated with the sample statistic under the null hypothesis. You can do this using the pnorm function. Report the p-value. Is your conclusion consistent with part (a)? b. 2. Consider the scenario presented in question 1. Here we will consider how the p-value will change with the sample size, keeping all the other information the same Create a vector, called "n", of different sample sizes, from 10 to 200 at an increment of 5 You can do this using the seq) command Use this vector of sample sizes, along with the information in question1 and the pnormO function, to create a vector of p-values that is the same length as the vector n Plot the vector of sample sizes on the horizontal axis and the vector of p-values on the vertical axis using the plot function Label the axes. Paste the figure below. Wha What range of sample sizes will give you a statistically significant result, holding the population standard deviation and sample average constant? a. t happens to the p-value as the sample size increases? b.
3. Now we will see how the sample average impacts the p-value Create a vector, called "xbar", of different observe increment of 5 Use this vector of sample averages, along with the information in question 1 and the pnorm0 function, to create a vector of p-values that is the same length as "xbar" Plot the vector of sample averages on the horizontal axis and the vector of p-values on the vertical axis using the plot function. Label the axes. d sample averages, from 920 to 1000 at an Paste the figure below. Wh What range of sample averages will give you a statistically significant result, holding the population standard deviation and sample size constant? a. at happens to the p-value as the sample average increases? b. 4. Now, we'll go through the same procedure keeping sample size and sample mean constant but changing the population standard deviation Create a numerical vector, called " to 250 at an increment of 5. You can do this using the seq0 command. Use this vector of population standard deviations, along with the information in question 1 and the pnorm function, to create a vector of p-values. Plot the vector of population standard deviations on the horizontal axis and the vector of p-values on the vertical axis using the plot function. Label the axes sigma", of different population standard deviations, from 120 Paste the figure below. What happens to the p-value as the population standard deviation increases? What range of population standard deviations will give you a statistically significant result, holding the sample average and sample size constant? a. b.
S. Now we'"ll do power analysis for question I For the hypothesis Ho 1,000 vs. Ha: μ < 1,000, with n 50, χ"z 955, σ 220, with α = 0.05, there is a range of values of x that will result in us rejecting the null hypothesis. This is called the rejection region, and the figure you created in question three hints at this. Find the rejection region in terms of x- Now consider alternative true values of μ ranging from 800 to 1000 at intervals of ten. Create a vector of these values use the seq0 function, and call this vector "true mu" a. b. c. Use the pnorm) to calculate the probability of observing the critical sample average found in part a., or a smaller value of x, using the vector of true mean values. This is the power of the test for alternative true values of mu. Plot the vector of alternative true values of μ on the horizontal axis and the vector a power on the vertical axis. Paste the figure below For what range of true values offl does our test have a power of 80% or more? d. e.

Answers

Answer:

1)

The nul hypothesis is that u l00o. We begin with computing the test statistic xbar 955 # sample mean siama22O > n50 # hypothe

2)

a)

> xbar=955 #sample mean
>
> mu0=1000 #hypothesized value
>
> sigma=220 #population standard deviation
>
> n<-seq(10,200,5) # n values from 10 to 200 by margin of 5
>
> pval=rep(0,length(n)) # define p value as same of length of "n"
>
> for(i in 1:length(n)){
+ z= (xbar-mu0)/(sigma/sqrt(n[i]))
+ pval[i]=pnorm(z)
+ }
>
> plot(n,pval,xlab="sample size",ylab="p-value",main = "P value as n increases")

b)

P value as n increases 12 oooo00ooo0000oo0oooo 髦3 100 150 20N) 50 sample size

Comment :- as sample size increases the P value is decreases.i.e result become significant as sample size increases.

c) n >= 65 will give us the statistically significant result.

in R it can be done as

> g<-data.frame(n,pval)
> subset(g,pval<0.05)
n pval
12 65 0.049563762
13 70 0.043508256
14 75 0.038245808
15 80 0.033661609
16 85 0.029659883
17 90 0.026160171
18 95 0.023094476
19 100 0.020405033
20 105 0.018042550
21 110 0.015964801
22 115 0.014135485
23 120 0.012523302
24 125 0.011101189
25 130 0.009845691
26 135 0.008736431
27 140 0.007755678
28 145 0.006887969
29 150 0.006119801
30 155 0.005439364
31 160 0.004836313
32 165 0.004301577
33 170 0.003827193
34 175 0.003406162
35 180 0.003032326
36 185 0.002700262
37 190 0.002405192
38 195 0.002142902
39 200 0.001909671

3)

assuming it is two-tailed test

mu0=1000 #hypothesized value

sigma=220 #population standard deviation, sqrt(102)

n=50 #sample size

xbar <- seq(920,1000,5)
pval = 2* (1- pnorm(abs((xbar-mu0)/(sigma/sqrt(n)))))
pval

plot(xbar,pval)

8 920 940 960 980 1000 xbar4)

Let \mu indicate the true mean of the population

We want to test the following hypotheses

Ho : μ-1000 Ha 1000 null hypothesis *- alternative hypothesis 0.025level of significance to test the hypothesis

R code to do this left tail test (all statements starting with # are comments)


xBar<-955 #sample mean
mu0<-1000 #hypothesized value
n<-50 #sample size

#a vector of population standard deviations, from 120 to 250
sigma<-seq(120,250,by=5)

#test statistic
z<- (xBar-mu0)/(sigma/sqrt(n))

#p-values, lower tail values P(Z<-z)
pval<-pnorm(z,lower.tail=TRUE)

#plot
plot(sigma,pval,type="l",xlab="Population standard deviation",ylab="p-value",main="p-value vs population sd")

#set the level of significance
alpha<-0.025

#find the range of population standard deviations with p-val<alpha
sigma[pval<alpha]

#get this plot

a)

p-value vs population sd 120 140 160 180 200220 240 Population standard deviation

We can see that the p-value increases as the population standard deviation increases.

We know that the standard error of mean is calculated using

\begin{align*} \sigma_{\bar{x}}=\frac{\sigma}{\sqrt{n}} \end{align*}

where n is the sample size and a is the population standard deviation

We can see that the standard error of mean increases with the population standard deviation for a given n.

Next the value of test statistics is

\begin{align*} z=\frac{\bar{x}-\mu_{H_0}}{\sigma_{\bar{x}}} \end{align*}

We can see that for a given sample average, the absolute value of z decreases (or the value of negative of z increase) with the increase in standard error (that is increase in population standard deviation)

This is a left tail test. Hence the p-value = P(Z<-z) will only increase when the absolute value of z decrease

b) Out put from R is below

> #find the range of population standard deviations with p-val alpha > sigma [pval<alpha] 1] 120 125 130 135 140 145 150 155

we will get statistically significant results when the p-value is less than the level of significance alpha.

For a level of significance alpha=0.025, we can see that we will get statistically significant results when the population standard deviation is between 120 to 160 (approximate), holding the sample average and sample size constant

5)

We reject the null hypothesis when p value<0.05 ie z<-1.645

ie vn <-1.645

iei. <-1.645 *-+ 1000 /50

ieT 948.82 is the rejection region interms of \bar{x}

b)tru_mu<-seq(800,1000,by=10) will generate numbers from 800 to 1000 in intervals of 10

c) power of the test is probability of rejecting the null hypothesis when actually it not true

P(< 948. 82/μ 900

= P\left (Z<\frac{948.82-900}{220/\sqrt{50}} \right )=P(Z<1.57)

When true \mu=900 the command interms of qnorm is

norm(1.57) will give you the required probability

so here the required r code is

z<-{948.82-trumu}/{220/sqrt(50)}
z

power<- pnorm(z) will give you the vector of probabilities corresponding to the alternatives from 800 to 1000 in the interval of 10

d) plot( tru_mu,power, main="power curve", ylab="power of the test",xlab="mu")

e) From the graph when mu ranges from 800 to 920 power is greater than 80%

Note: the r codes are given in italics

.

Similar Solved Questions

1 answer
. When you first choose Inventory Part item in the New item window of the Item List, which two accounts does QuickBooks look for on the Chart of Accounts List? Can you customize these accounts? If so,...
. When you first choose Inventory Part item in the New item window of the Item List, which two accounts does QuickBooks look for on the Chart of Accounts List? Can you customize these accounts? If so, explain how....
1 answer
Can someone help me with these ? 2. The value of an indicates the change in...
can someone help me with these ? 2. The value of an indicates the change in the number of moles of gas in the balanced chemical equation. Adjust An and observe how the chemical equation changes. An Chemical equation MIASTA K expression a. Predict what happens to the concentration of a gas (in moles ...
1 answer
The questions concern water flowing in or from a hose. The cross section of the hose...
The questions concern water flowing in or from a hose. The cross section of the hose is circular. The circumference of a circle is 2πR and the area of a circle is πR2, where R is the radius of the circle. 1 milliliter = 1 cm3. A. If the inner diameter of the hose is 1.13 cm, and the water flow...
1 answer
Required information The following information applies to the questions displayed below) Oak Mart, a producer of...
Required information The following information applies to the questions displayed below) Oak Mart, a producer of solid oak tables, reports the following data from its second year of business. 319 per unit 110,000 units 113,250 units 3,250 units $ 455,000 260,000 715,000 $ Sales price per unit Units ...
1 answer
Java // Strings Using the StringBulderClass write an program that takes this text below and substitutes...
Java // Strings Using the StringBulderClass write an program that takes this text below and substitutes your name every time there is an "it" or "It". The program also should remove the commas and replace them with colons. Then print the resulting string "It was the best of time...
1 answer
PartA A flat slab of nonconducting material (see the figure(Figure 1)) carries a uniform charge per...
PartA A flat slab of nonconducting material (see the figure(Figure 1)) carries a uniform charge per unit volume PE The slab has thickness d which is small compared to the height and breadth of the slab Determine the electric field as a function of z inside the slab. Take the origin at the center of ...
1 answer
The accounting records of NuTronics, Inc., include the following information for the year ended December 31....
The accounting records of NuTronics, Inc., include the following information for the year ended December 31. Dec. 31 Jan. 1 Inventory of materials $ 24,000 $ 20,000 Inventory of work in process 8,000 12,000 Inventory of finished goods 90,000 80,000 Direct materials used ...
1 answer
Critical Thinking Problem 20.1 Understanding Stockholders' Equity Just after its formation on September 1, 2019, the...
Critical Thinking Problem 20.1 Understanding Stockholders' Equity Just after its formation on September 1, 2019, the ledger accounts of the Ducks, Inc., contained the following balances: 10 points References Accrued Expenses Payable Accounts Payable Accounts Receivable Allowance for Doubtful Acc...
1 answer
Na Ulf 1) Solid sodium metal reacts with water to form sodium hydroxide and hydrogen gas....
Na Ulf 1) Solid sodium metal reacts with water to form sodium hydroxide and hydrogen gas. a. Write a balanced chemical equation for this reaction (2 pts) Nars) + H₂O → Na DH+H Nais) + H₂O11 - Na Oltiag) + Hig) b. How many grams of sodium metal were reacted with excess water if the h...
1 answer
(1 point) Consider the following initial value problem: y" +9y (st, o<t<8 y(0) = 0, '(0)...
(1 point) Consider the following initial value problem: y" +9y (st, o<t<8 y(0) = 0, '(0) = 0 132, ?> 8 Using Y for the Laplace transform of y(t), i.e., Y = C{y(t)} find the equation you get by taking the Laplace transform of the differential equation and solve for Y(8)...
1 answer
Conglomo Inc. has a cost of capital of 1796. This is based on a risk-free rate...
Conglomo Inc. has a cost of capital of 1796. This is based on a risk-free rate of 4%, a market risk premium of 1096 and the firm's average beta of 1.3. This is a breakdown of the firm's divisions: 1/3 is Automotive Retailer Beta = 2.0 1/3 is Computer Manufacturer Beta = 1.3 1/3 is Electric U...
1 answer
Take methane and use it as an example of all the concepts listed here: Orbital hybridization...
Take methane and use it as an example of all the concepts listed here: Orbital hybridization Molecular polarity...
1 answer
Find the solubility of Lead (II) iodide (MW = 461.2 g/mol) in g/100 mL if the...
Find the solubility of Lead (II) iodide (MW = 461.2 g/mol) in g/100 mL if the Ksp is equal to 8.30x10-9 Steps and explanation please! Thanks in advance!...
1 answer
Explain what property right shareholders have and why that right is insufficient to make them private property owners of...
Explain what property right shareholders have and why that right is insufficient to make them private property owners of corporate assets....
1 answer
Using the following example to come up with a formula for displacement for a sphere instead...
Using the following example to come up with a formula for displacement for a sphere instead of a cone. I am having a hard time coming up with an expression for A(y) (circle in red). Can someone please show with steps how to come up with an expression for A(y) so that I can solve for displacement sim...
1 answer
Using Kirchhoff's rules, find the following. ( 1 = 70.6 V, _2 = 61.4 V, and...
Using Kirchhoff's rules, find the following. ( 1 = 70.6 V, _2 = 61.4 V, and _3 = 79.4 V.) the current in each resistor shown in the figure above I_r1 mA Ir_2 = mA IR _3 = ma the potential difference between points c and f magnitude of potential difference point at higher potential...
1 answer
Explain why Latin America is considered “impulsive, spontaneous” concerning decision making in negotiations, and how that...
Explain why Latin America is considered “impulsive, spontaneous” concerning decision making in negotiations, and how that may affect when doing business in that region? Answer in at least 150 words....