Question

To be completed with code from R Studio. No additional information provided. In AU supermarkets, the...

To be completed with code from R Studio. No additional information provided.

In AU supermarkets, the average weight of a banana is 119.9 grams. An agricultural scientist buys bananas from a supermarket. Their weight, in grams, is as follows:

c(113.9, 90.5, 93.9, 113.4, 101, 76.4)

She suspects that this sample of bananas is lighter than average and wonders if this supermarket is selling bananas that are lighter than the AU average.

(a) State a sensible null hypothesis

(b) State the precise definition of p-value and explain what “more extreme” means in this context

(c) Is a one-sided or two-sided test needed? justify

(d) Perform a student t-test using R and interpret

(e) Perform a Z test and account for any differences you find

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution-:

Given data: 113.9, 90.5, 93.9, 113.4, 101, 76.4 , n=6

By using RStudio:

> # Hypothesis
> #(a) Null Hypothesis Ho: The average weight of a bananasis 119.
> #Vs
> # Alternative Hypothesis H1: The average weight of a bananas is lighter than 119.
> #(d) mu=119.9
> x=c(113.9,90.5,93.9,113.4,101,76.4);x
[1] 113.9 90.5 93.9 113.4 101.0 76.4
> t.test(x,mu=119.9,conf.level=0.95,alt="l")

   One Sample t-test

data: x
t = -3.6913, df = 5, p-value = 0.007064
alternative hypothesis: true mean is less than 119.9
95 percent confidence interval:
-Inf 110.0384
sample estimates:
mean of x
98.18333

(c) This is one sided, beacuse alternative hypothesis is left tailed.

(b) The P-value is the probability of a larger effect than what was observed.

Here, P-value= 0.007064 is less than level of significance =0.05 so we reject the null hypothesis.

(e) Here, \sigma is unkown so  we can not perform or apply Z- test.

RStudio Code:


# Hypothesis
#(a) Null Hypothesis Ho: The average weight of a bananasis 119.
#Vs
# Alternative Hypothesis H1: The average weight of a bananas is lighter than 119.
#(d) mu=119.9
x=c(113.9,90.5,93.9,113.4,101,76.4);x
t.test(x,mu=119.9,conf.level=0.95,alt="l")

Add a comment
Know the answer?
Add Answer to:
To be completed with code from R Studio. No additional information provided. In AU supermarkets, the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT