Hypothesis Testing, The z-test
PSYC 2317 Mark W. Tengler, M.S.
Assignment #10
The z-test
10.1 Assume that a treatment does have an effect and that the treatment effect is being evaluated with a z hypothesis test. If all factors are held constant, how is the outcome of the hypothesis test influenced by sample size? To answer this question, do the following two tests and compare the results. For both tests, a sample is selected from a normal population distribution with a mean of μ = 60 and a standard deviation of σ = 10. After the treatment is administered to the individuals in the sample, the sample mean if found to be M = 65. In each case, use a two-tailed test with = .05. a. For the first test, assume that the sample consists of n = 4 individuals. b. For the second test, assume that the sample consists of n = 25 individuals. c. Explain in your own words how the outcome of the hypothesis test is
influenced by the sample size.
Note: Be sure and show a picture of the research design. Also show all steps and calculations you made for each test following the process outlined in the z-test formula sheet handout. What statistical decision do you make in each case?
10.2 Researchers have often noted increases in violent crimes when it is very hot. In fact, Reifman, Larrick, and Fein (1991) noted that this relationship even extends to baseball. That is, there is a much greater chance of a batter being hit by a pitch when the temperature increases. Consider the following hypothetical data. Suppose that over the past 30 years, during any given week of the major league season, an average of μ = 12 players are hit by wild pitches. Assume the distribution is nearly normal with σ = 3. For a sample of n = 4 weeks in which the daily temperature was extremely hot, the weekly average of hit-by-pitch players was M = 15.5. Are players more likely to get hit by pitches during the hot weeks? Set alpha to .05 for a one-tailed test.
1
Single Sample z-test
I. Assumptions for z-test A. one sample, randomly selected B. know population mean and population standard deviation ahead of time C. standard deviation is unchanged by treatment or experiment D. sample means are normally distributed; take all the possible sample means that
could happen by chance without treatment (usually normally distributed for behavioral sciences if sample is greater than or equal to 30)
II. Diagramming your research (show the whole logic and process of hypothesis testing)
a. Draw a picture of your research design (see diagramming your research handout).
b. There are always two explanations (i.e. hypotheses) of your research results, the wording of which depends on whether the research question is directional (one- tailed) or non-directional (two-tailed). State them as logical opposites.
c. For statistical testing, ignore the alternative hypothesis and focus on the null hypothesis, since the null hypothesis claims that the research results happened by chance through sampling error.
d. Assuming that the null is true (i.e. that the research results occurred by chance through sampling error) allows one to do a probability calculation (i.e. all statistical tests are nothing more than calculating the probability of getting your research results by chance through sampling error).
e. Observe that there are two outcomes which may occur from the results of the probability calculation (high or low probability of getting your research results by chance, depending on the alpha (α) level).
f. Each outcome will lead to a decision about the null hypothesis, whether the null is probably true (i.e. we then accept the null to be true) or probably not true (i.e. we then reject the null as false).
III. Hypotheses (i.e. the two explanations of your research results)
A. Two-tailed (non-directional research question) 1. Alternative hypothesis (H1): The independent variable (i.e. the treatment)
does make a difference in performance. 2. Null hypothesis (H0): The independent variable (i.e. the treatment) does
not make a difference in performance. B. One-tailed (directional research question)
1. Alternative hypothesis (H1): The treatment has an increased (right tail) or a decreased (left tail) effect on performance.
2. Null hypothesis (H0): The treatment has an opposite effect than expected or no change in performance.
2
IV. Determine critical regions (i.e. the z score boundary between the high or low probability
of getting your research results by chance) using table A-23 A. Significance level (should be given or decided prior to the research; also called
the confidence, alpha, or p level) 1. α or p = .05, .01, or .001
B. One- or two-tailed test (using table A-23) 1. One-tailed: use full alpha level amount for proportion in tail (Column C) 2. Two-tailed: use half alpha level amount for proportion in tail (Column C)
C. With one- or two-tailed p values, find the critical z value 1. If two-tailed, then critical z value is ± z value 2. If one-tailed, then determine if critical z value is +z (right tail) or -z (left
tail) V. Calculate the z-test statistic
A. General Single Sample z-test statistical test formula z = the observed sample mean – the hypothesized population mean
standard error B. Calculations
1. Compute standard error (average difference between sample & population means) Note: (standard error is simply an estimate of the average sampling error which may occur by chance, since a sample can never give a totally accurate picture of a population)
σM = 𝜎
√𝑛 or √
𝜎2
𝑛
2. Compute z-test statistic (i.e. calculates the probability of getting your
research results by chance through sampling error)
Z = 𝑀− µ
𝜎𝑀
B. Compare the calculated z-score to the critical z-score & make a decision about
the null hypothesis 1. Reject the null (as false) and accept the alternative or 2. Accept null (as true)
VI. Reporting the results of a single sample z test
“The treatment had a significant effect on scores (M = 25, SD = 4.22); z = +3.85, p < .05, two-tailed.”
- Assignment-10
- z-single