You are on page 1of 22

Errors, Chi square test, Z &

T Test
Dr. Namita Ashish Singh
Assistant Professor
Department of Microbiology,
MLSU Udaipur
Hypothesis vs. research question
• Research Question: “Does television content enrich a child’s
imaginative capacities by offering materials and ideas for make-
believe play?
• Hypothesis: The amount of time a child spends in make-believe play is
directly related to the amount of time spent viewing make-believe
play on television.
• Null Hypothesis: the denial or negation of a research hypothesis; the
hypothesis of no difference
• HO: “There is no significant difference between the amount of time children
engage in make-believe play and the amount of time children watch make-
believe play on television.”
Data analysis and interpretation
• Every research study must be carefully planed and performed
according to specific guidelines.
• When the analysis is completed, the researcher must step back
and consider what has been discovered.
• The researcher must ask two questions:
• Are the results internally and externally valid?
• Are the results valid
Neither Valid Valid but Not Valid Both Valid
nor Reliable not Reliable but Reliable and Reliable
Hypothesis Testing Procedure, Cont.
• H0 – Null Hypothesis
• “There is no significant difference/relationship between groups”
• Ha – Alternative Hypothesis
• “There is a significant difference/relationship between groups”
• Always state your Hypothesis/es in the Null form
• The object of the research is to either reject or accept the Null
Hypothesis/es
Type I and Type II Errors
• Type I Error
• An error caused by rejecting the null hypothesis when it should be accepted
(false positive).
• Has a probability of alpha (α).
• Practically, a Type I error occurs when the researcher concludes that a
relationship or difference exists in the population when in reality it does not
exist.
• “There really are no monsters under the bed.”
• Type II Error
• An error caused by failing to reject the null hypothesis when the hypothesis
should be rejected (false negative).
• Has a probability of beta (β).
• Practically, a Type II error occurs when a researcher concludes that no
relationship or difference exists when in fact one does exist.
• “There really are monsters under the bed.”
Type I and II Errors and Fire Alarms?

FIRE NO FIRE

NO ALARM TYPE I NO ERROR

Alarm NO ERROR TYPE II

H0 is H0 is True
False

ACCEPT H0 TYPE I NO ERROR

REJECT H0 NO ERROR TYPE II


Chi-square test for comparing proportions
(of a categorical variable) between >2 groups

I.Chi-Square Test of Independence


When both your predictor and outcome variables are categorical,
they may be cross-classified in a contingency table and compared
using a chi-square test of independence.

A contingency table with R rows and C columns is an R x C


contingency table.
A chi square (X2) statistic is used to investigate whether distributions
of categorical (i.e. nominal/ordinal) variables differ from one another.
General Notation for a chi square 2x2 Contingency
Table
Variable 1
Variable 2 Data Type 1 Data Type 2 Totals
Category 1 a b a+b
Category 2 c d c+d
Total a+c b+d a+b+c+d

2
2 ( 𝑎𝑑 −𝑏𝑐 ) ( 𝑎+ 𝑏+𝑐 + 𝑑 )
𝑥 =
( 𝑎+ 𝑏 ) ( 𝑐+ 𝑑 )( 𝑏 +𝑑 ) ( 𝑎+ 𝑐 )
Chi square Steps

• Collect observed frequency data


• Calculate expected frequency data
• Determine Degrees of Freedom
• Calculate the chi square
• If the chi square statistic exceeds the probability or table value (based upon a p-
value of x and n degrees of freedom) the null hypothesis should be rejected.
The Chi-Square test

Number of group members?

Conformed?
2 4 6 8 10

Yes 20 50 75 60 30

No 80 50 25 40 70

Apparently, conformity less likely when less or more group


members…
• 20 + 50 + 75 + 60 + 30 = 235 conformed
• out of 500 experiments.

• Overall likelihood of conforming = 235/500 = .47


Observed frequencies
Roll the die n = 60 times. The sample average is 3.75;
but we are interested in the total distribution
Pearson’s Chi-squared statistic

= 14.2
Pearson’s Chi-squared statistic

= 14.2
Chi-square versus z-test
• z-test: to compare the average of a sample with an expected average
• Chi-squared test: to compare the entire distribution of the sample
with an expected distribution

Chi-squared:
z-test:
Hypothesis is about
Hypothesis is only about
distribution of categories box
average of numbers in box
Single Group Z and T-Tests
• The basic goal of these simple tests is to show that the
distribution of the given data under examination are not
produced by chance and that there is some systematic
pattern therein.
• Main point is to show the mean of a sample is
reflective of the population.

• Salkind’s text skips a discussion of single group/sample


T-Tests.
Review of Z-Tests
• Recall that a Z-score can measure the location of a
given value on a normal distribution, which can be
expressed as a probability.

• A Z-Test uses the normal distribution to obtain a test


statistic based on some data that can be compared
with a sampling distribution of chance, which is an
abstract construction drawn from the data.

• This is a parameter estimation, which is an inference


of a sample based on a population of data.
Problem with Z Tests
• But because we do not often know the population variance, σ2, we
estimate a single “point estimate” or value (sample mean).

• However, this sample mean may vary greatly from the real
population mean, μ. This error is called “sampling error.”
Student’s T-Test
• Problem: We may not know the mean and variance of
some populations, which means we cannot do a Z-
Test. In this case, we use a T-test, Student’s T to be
specific, for use with a single group or sample of data.

• Again, this is when we are not looking at different


groups but a sample of data as an entirety. We will
next examine differences in groups.
Student’s T-Test
• One uses this test when the population variance is
unknown, as is usually the case in the social sciences.
• The standard error of the sampling distribution of the
sample mean is estimated.
• A t distribution (not normal curve, more platykurtic
but mean=0) is used to create confidence intervals,
like critical values.

You might also like