Editing
Problem 2-2, Comparing a single mean to a specified value (second example)
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Solution== [[Image:2-2fig1.png|thumb|left|'''Figure 1:''' Our data compared to a theoretical Gaussian distribution.]] ===Section A: Choosing hypotheses=== In this problem we are told we would like our liquid detergent to have a mean of <math>\mu_0 = 800</math> and a standard deviation of <math>\sigma = 25</math>: this is our theoretical distribution. We are also told that a sample of <math>N = 16</math> batches of detergent have an average viscosity of <math>\overline{y} = 812</math>, which estimates the mean of our true distribution. We would like to know if the means of our true and theoretical distributions are likely to be the same. There are two hypotheses to consider here. Our null hypothesis is that the means of the two distributions are equal, and our alternative hypothesis is that they are not equal. <center>H<sub>0</sub>: μ = μ<sub>0</sub><br /> H<sub>1</sub>: μ ≠ μ<sub>0</sub></center> The alternate hypothesis is called ''two-tailed'' because it is true if <math>\mu < \mu_0</math> and if <math>\mu > \mu_0</math>. <br clear='all'> [[Image:2-2fig2.png|thumb|left|'''Figure 2:''' Our plot after normalizing.]] ===Section B: Z-values=== To compare the mean of the true distribution to that of the theoretical distribution, we test the null hypothesis with a z-test. The z-value is calculated as in problem 2-1: <center><math>z=\frac{\bar{y}-\mu_0}{\sigma/\sqrt{n}}=1.92</math><br/></center> Since we have a two-tailed alternative hypothesis, we must define a rejection region at both extremes of our theoretical distribution. Our value for <math>\alpha</math> determines the total size of the rejection region, so we simply declare that 2.5% (since <math>\alpha</math> = .05, or 5%) of the area on the left of our theoretical distribution is a rejection region, and 2.5% of the area on the right is also a rejection region (see Figure 2). We calculate <math>z_{\alpha/2}</math> to determine the x-value that corresponds to the rightmost edge of the rejection region on the left, and <math>z_{1-\alpha/2}</math> to find the leftmost edge of the rejection region on the right (see Figure 2 again). <center><math>z_{\alpha/2}=-1.96</math>, <math>z_{1-\alpha/2} = 1.96</math></center> If z is between <math>{z_\alpha}</math> and <math>z_{1-\alpha/2}</math>, it is not in the rejection region and we claim the null hypothesis to be true (with a confidence of 95%). Otherwise we claim the alternative hypothesis to be true (with the same confidence). Note that <math>|z_{\alpha/2}| = z_{1-\alpha/2}</math>. This is always true. You can simply compare your z-value to <math>|z_{\alpha/2}|</math> to perform a z-test. If <math>z < |z_{\alpha/2}|</math>, claim your null hypothesis to be true, otherwise claim that your alternative hypothesis is true. ===Section C: P-values=== We now calculate a P-value the same way we did in problem 2-1. Graphically, we extend the rejection region inwards from both tails until we run into our z-value. The P-value is the area of the shaded area, calculated in Excel with <tt>=2*NORMSDIST(-ABS(z))</tt> or in R with <tt>2*pnorm(-abs(z))</tt>. These functions integrate a normal distribution from negative infinity to the number we give it (in this case the negative absolute value of z), so we give it our negative z-value and multiply by two in order to get the total area of the shaded regions on the graph. <center>P-value <math>= 0.0549</math></center> Our z-value is very close to the rejection region, so a plot illustrating the extended rejection regions will look nearly identical to Figure 2. <div style="float:left; vertical-align: top">[[Image:2-2fig4.png|thumb|left|'''Figure 4:''' The confidence interval about the sample mean.]]<br> [[Image:2-2fig5.png|thumb|left|'''Figure 5:''' The confidence interval about the theoretical mean.]]</div> ===Section D: Confidence intervals=== To calculate the limits of the confidence interval for the sample mean, we use the following formula: <center><math>\bar{y}</math> confidence interval limits = <math>\mu_0\pm z_{\alpha/2} \sigma/\sqrt{n}</math></center> This tells us the range in which a sample mean could lie in order for us to accept our null hypothesis: <center><math>787.75<\bar{y}<812.25</math></center> We can calculate the confidence interval for <math>\mu_0</math> in a similar way, which tells us the range in which the mean of our theoretical distribution (given a sample mean of 812) could lie in order for us to accept our null hypothesis: <center><math>\mu_0</math> confidence interval limits = <math>\bar{y}\pm z_{\alpha/2} \sigma/\sqrt{n}</math><br /> <math>799.75<\mu_0<824.25</math></center>
Summary:
Please note that all contributions to Statistics may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Statistics:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information