Question

In: Math

Listed below are the weights of a random sample of blue M&Ms (in grams): 0.881 0.863...

Listed below are the weights of a random sample of blue M&Ms (in grams): 0.881 0.863 0.775 0.854 0.810 0.858 0.818 0.768 0.803 0.833 0.742 0.832 0.807 0.841 0.932 (a) Create a vector with these data. Find the mean, standard deviation and number of observations for these data. (b) Draw a histogram and a normal probability plot for these data. Is the assumption of normality valid for these data? (c) Test the claim that the mean weight of all blue M&Ms is greater than 0.82 grams (α = 0.05). Include the null and alternative hypotheses and your conclusion in the context of the data. (e) Create a plot that includes the sampling distribution of your statistic under the null hypothesis, the value of the statistic as a vertical line, and the P-value. R code

Solutions

Expert Solution

(a)

Create the vector using the code -

> x <- c(0.881,0.863,0.775,0.854,0.81,0.858,0.818,0.768,0.803,0.833,0.742,0.832,0.807,0.841,0.932)

Then you can find the mean, standard deviation and count using the 'mean', 'sd' and 'length' function as -

> mean = mean(x)
> standard_deviation = sd(x)
> count = length(x)

Read the output using the vectors as -

> mean
[1] 0.8278
> standard_deviation
[1] 0.04775712
> count
[1] 15

-------------------------------------------

(b)

You can draw the histogram using the following command -

> hist(x)

This will give you the histogram as -

Then you can generate the Q-Q plot using the code -

> qqnorm(x)
> qqline(x)

This would give you following output -

The data almost seems to fit the line except 2 points. These points can be considered as an outlier and we can say that the data is approximately normally distributed. Hence, assumption of normality is valid.

---------------------------------------------------------------------------

(c)

Null Hypothesis - H0 : 0.82

Alternate Hypothesis - H1 : > 0.82

Significance level = = 0.05

Use the following R-code for getting the p-value of test -

> t.test(x, mu=0.82, alternative = "greater")

This should give you following output -

The p-value of test = 0.2686.

As the p-value is greater than the significance level of 0.05, so we fail to reject the null hypothesis and conclude that there is not enough evidence to conclude that the mean weight of blue M&Ms is greater than 0.82 grams.

---------------------------------------------------

(e)

The sampling distribution of the sample mean would be approximately normal given as -

Where =0.82 grams, s = 0.0478 grams and n = 15.

Use the following code to get the required plot -

> y <- seq(0.77,0.87, by = 0.001)

> prob <- c(dnorm(y,0.82,0.01233084))

> plot(y, prob)
> abline(v =0.8278, lty = 3)

This should give you following output -


Related Solutions

Listed below are the weights (in grams) of a sample of M&M's Plain candies, classified according...
Listed below are the weights (in grams) of a sample of M&M's Plain candies, classified according to color. Red Orange Yellow Brown Tan Green 0.946 0.902 0.929 0.896 0.845 0.935 1.107 0.943 0.960 0.888 0.909 0.903 0.913 0.916 0.938 0.906 0.873 0.865 0.904 0.910 0.933 0.941 0.902 0.822 0.926 0.903 0.932 0.838 0.956 0.871 0.926 0.901 0.899 0.892 0.959 0.905 1.006 0.919 0.907 0.905 0.916 0.905 0.914 0.901 0.906 0.824 0.822 0.852 0.922 0.930 0.930 0.908 0.965 1.052 0.883 0.952...
In 1995 the Mars Company replaced tan M&Ms with blue M&Ms. A sample of 100 plain...
In 1995 the Mars Company replaced tan M&Ms with blue M&Ms. A sample of 100 plain M&Ms before the introduction of blue M&Ms had a mean weight 0.9160g with a standard deviation of 0.0433g. A sample of 100 plain M&Ms taken after 1995 had a mean weight of 0.9147g and a standard deviation of 0.0369g. (a) Construct the 98% confidence interval for the difference in the mean weight of plain M&Ms before and after the introduction of blue M&Ms. List:...
Assume the population distribution is normally distributed, the weights (in 1000 grams) of a random sample...
Assume the population distribution is normally distributed, the weights (in 1000 grams) of a random sample of 10 boxes of cereal are: 10.2 10.1 10.1 9.7 10.3 9.8 9.9 9.8 10.4 10.3 (c) Assume the population standard deviation is given. If one decreases the sample size while keeping the same confidence level, what is the effect on the length of a confidence interval of a population mean? Justify your answer. (d) Assume the population standard deviation is given. If one...
Assume the population distribution is normally distributed, the weights (in 1000 grams) of a random sample...
Assume the population distribution is normally distributed, the weights (in 1000 grams) of a random sample of 10 boxes of cereal are: 10.2 10.1 10.1 9.7 10.3 9.8 9.9 9.8 10.4 10.3 (a) Find a 99% confidence interval for the mean weight of each box of cereal. (b) Assume the population standard deviation is 30 grams. Construct a 96% confidence interval for the mean weight of each box of cereal. (c) Assume the population standard deviation is given. If one...
A bowl of M&M's consists of 100 blue M&Ms and 90 gold M&Ms. Assume that the...
A bowl of M&M's consists of 100 blue M&Ms and 90 gold M&Ms. Assume that the M&Ms are all mixed up in the bowl, and that drawing out M&Ms is like simple random sampling. a) Suppose you draw out 10 M&Ms. Write a math expression for the chance that you get more blue M&Ms than gold. Use the cell below to find the numerical value of the answer, and write the output on your paper along with the math expression....
Assume that 15% of all M&Ms are blue in color. If 100 M&Ms are (randomly) poured...
Assume that 15% of all M&Ms are blue in color. If 100 M&Ms are (randomly) poured into a bowl, use the normal approximation to find the probability that more than 20 are blue. Round answer to four decimal places.
Listed below are weights (hectograms or hg) of randomly selected girls at birth. Use the sample...
Listed below are weights (hectograms or hg) of randomly selected girls at birth. Use the sample data to construct a 95% confidence interval for the mean weight of girls. 33 28 33 37 31 32 31 28 43 28 33 26 30 31 28 Address the following questions: What is alpha What is Zα/2  or tα/2 Which formula did you use and what is the Confidence Interval?
According to Mars, Inc., 20% of all M&Ms produced are blue. One bag of 50 M&Ms...
According to Mars, Inc., 20% of all M&Ms produced are blue. One bag of 50 M&Ms represents the sample for this problem. The sample data can be used to perform a two-sided hypothesis test to test whether 20% of all M&Ms are blue. In one bag of 50 M&Ms, there are 14 blue M&Ms. Use this data to test whether 20% of all M&Ms are blue.
According to M&Ms are randomly mixed to have 24% blue M&MS. Suppose your bag has a...
According to M&Ms are randomly mixed to have 24% blue M&MS. Suppose your bag has a total of 57 M&Ms and 11 are blue. Assuming the distribution of total m&m is normally distribution, what is the mean and standard deviation of the sample distribution? Whats the standard score? Whats the null hypothesis and alternate hypothesis? ONE sided or two sided? What is the p-value At the 5% significance level, what would our conclusions be?
Listed below are the durations​ (in hours) of a simple random sample of all flights of...
Listed below are the durations​ (in hours) of a simple random sample of all flights of a space shuttle program. Find the​ range, variance, and standard deviation for the sample data. Is the lowest duration time​ unusual? Why or why​ not? 76    90    234    195    165    265    197    372    252    237    384    340    225    245    0
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT