Understanding Statistics Using R by Randall Schumacker & Sara Tomek

Understanding Statistics Using R by Randall Schumacker & Sara Tomek

Author:Randall Schumacker & Sara Tomek
Language: eng
Format: epub
Publisher: Springer New York, New York, NY


HYPOTHESIS TEST R Program

The HYPOTHESIS TEST program allows you to specify the true population mean and then test various null and alternative hypotheses. In the program output, you will be able to observe either z-tests or t-tests for several statistical hypotheses depending upon whether the population standard deviation (z-test) or sample standard deviation (t-test) is used. The program will select a random sample of size N from the true population, compute the sample mean and variance, compute the appropriate test statistic, the p-value, and indicate the decision outcome. Since you specify the true population mean, you will know whether or not the decision to reject the null hypothesis is correct. If the population standard deviation is used (set varUse  =  0, the default), the z-statistic is reported. If the sample standard deviation is used (set varUse  =  1), the t-statistic is reported.

The program uses the pValue function in R to determine the probability in the tails for either the z-test or t-test after all the user-defined variables are initialized. Based on the direction of the statistical hypothesis for the z-test or t-test, probability values are determined using the pnorm function, which returns the probability value for a mean difference with a given standard deviation. If the sample mean is less than the null hypothesis mean, then pnorm is reported; if the sample mean is greater than the null hypothesis mean, then 1-pnorm is reported. This use of the pnorm function results in only the probability area for one-tail of either the normal- or t-distribution. For a two-tailed test, the probability area (alpha) is divided evenly between the two ends of the distributions. The program specifies the probability area for one- and two-tailed tests by selecting a value for the tails variable. The program default is p  <  .05, therefore if the computed p-value is less than.05, the decision is reject the null. If the p-value is greater than.05, the decision is retain the null. The number of statistical tests computed and printed is based upon the value for numSamples.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.