Statistics hypothesis testing with t-test and z-test
Size: 744.46 KB
Language: en
Added: Oct 22, 2025
Slides: 26 pages
Slide Content
T-test & Z-test Analysis Using SPSS Group: Karam Hussain Beena Zaidi
T-test Definition: The t-test is used to compare the values of the means from two samples and test whether it is likely that the samples are from populations having different mean values. It’s used especially in testing hypotheses about means of normal distributions when the standard deviations are unknown.
T-test for testing hypothesis The first step is to formulate a null hypothesis written. The statement for is usually expressed as an equation or inequality as follows:
T-test for testing hypothesis Also in this step it is stated an alternative hypothesis, written a statement that indicates the opinion of the conductor of the test as to the actual value of is expressed as follows:
5 T-Test Rejection region Rejection region Lower upper In directional test there are two critical values when:
6 T-Test Rejection region upper In directional test there is one critical value (upper boundary ) when:
One Sample T-test Example: We obtained an overall group performance mean of 56.1% with a standard deviation of 14.3, in a sample of 24 participants Ho: μ sample=50.0 or μ sample= μ chance H1 : μ sample 50.0 n = 24, a=.05, df = n – 1= 23, two-tailed: CV = 2.069
One Sample T-test
One Sample T-test t( obt ) = 2.0898 > t( crit ) = 2.069 – Reject the null hypothesis, accept the alternative Conclude that the sample performance is different from a population with a mean 50.0 Performance is significantly above chance
Two Sample T-test We want to know whether the groups under study are significantly different from each other null hypothesis – H0 : μ1 = μ2 alternative hypothesis – H1 : μ1 μ2 ( Non-directional, two tailed test)
Two Sample T-test Example: Men and women were given a paper-and pencil test of mental rotation ( maximum score = 24)
Two Sample T-test df = 87 + 108 – 2 = 193 Now, we find the critical value
Two Sample T-test The critical value associated with 193 df (n1+ n2 - 2) at .05 level of significance is 1.96 Our obtained t of 3.5445 is greater than 1.96 we reject the null and accept the alternative hypothesis the mean for males is significantly greater than the mean for females
Z-test A statistical test used to determine whether two population means are different when the variances are known and the sample size is large.
Z-test Z-test is appropriate when you are handling moderate to large samples (n > 30 ) We use Z-test when standard deviation is known which is rarely known in real life
T-test Using SPSS Analyze → Compare Means → One Samples T-test
Select the dependent variable(s) that you want to test by clicking on it in the left hand pane of the One-Sample t Test dialog box Click in the Test Value box and enter the value that you will compare to. In this example, we are comparing if the number of older siblings is greater than 1, so we should enter 1 into the Test Value box:
There are two parts to the output. The first part gives descriptive statistics for the variables that you moved into the Test Variable(s) box on the One-Sample t Test dialog box. In this example, we get descriptive statistics for the Older variable : This output tells us that we have 46 observations (N), the mean number of older siblings is 1.26 and the standard deviation of the number of older siblings is 1.255. The standard error of the mean (the standard deviation of the sampling distribution of means) is 0.185 (1.255 / square root of 46 = 0.185).
The second part of the output gives the value of the statistical test : The second column of the output gives us the t-test value : 1.410 The third column tells us that this t test has 45 degrees of freedom The critical t with 45 degrees of freedom, α = .05 and one-tailed is 1.679 The decision rule is: I f the one-tailed critical t value is less than the observed t we can reject H T he critical t is 1.679 is greater than the observed t is 1.410, so we fail to reject H T here is insufficient evidence to conclude that the mean number of older siblings for the PSY 216 classes is larger than 1
The Independent Samples t-test The Independent Samples t-test can be used to see if two means are different from each other when the two samples that the means are based on were taken from different individ Write the null and alternative hypotheses first uals who have not been matched H : µ Section 1 = µ Section 2 H 1 : µ Section 1 ≠ µ Section 2 Specify the α level: α = . 05 Analyze → Compare Means → Independent-Samples T-test
Move the Older variable (number of older siblings) into the Test Variables box : Then click on the lower arrow button to move the variable in the Grouping Variable box You need to tell SPSS how to define the two groups
First , the descriptive statistics : There are 14 people in the 10 AM section (N ): They have, on average, 0.86 older siblings Standard deviation of 1.027 older siblings. There are 32 people in the 11 AM section ( N): They have, on average, 1.44 older siblings S tandard deviation of 1.318 older siblings.
The second part of the output gives the statistics: In this example, assuming equal variances, the t value is 1.461. (We can ignore the sign of t for a two tailed t-test.) In this example, there are 44 degrees of freedom Decide if we can reject H : As before, the decision rule is given by: If p ≤ α , then reject H . In this example, .151 is not less than or equal to .05, so we fail to reject H