Hypothesis
Quantitative
Techniques and
Simulation
Chapter V
Senior Lectures by:
RESEARCH
METHOD
Formulating the HYPOTHESIS
Test of the Hypothesis
Statement of the PROBLEM
1. Recognition of the FACTS 2. Discovery of the Problem
3. Problem Formulation
1. Design Test
What is a Hypothesis?
Hypothesis Testing for One Population Value:
–
Population mean
(
a.
(population standard deviation) is given (known):
Use z/standard normal/bell shaped distribution
b.
(pop std dev) is not given but s (sample std dev) is given
Use student’s t distribution
–
Population proportion (
)
–
Population Variance (
Use
2(Chi-Square) distribution. Population Standard Deviation =
Example: The mean monthly cell phone bill the student of AUCA is = 10000 RwfExample: The proportion of the students of AUCA with cell phones is p = .80
Use z/standard normal/bell shaped distribution
Hypothesis
Hypothesis: A statistical hypothesis is a statement on a
probabilistic model and a hypothesis test is a method to determine
the possibility of that statement based on a sample.
Presumptions thus often provide the occasion for an
investigation. For this reason it is called research hypothesis.
I a
ssume
the m
ean
M
onthly
cell ph
one bill
the stu
dents o
f
AUCA
Purpose of hypothesis testing
•
The purpose of hypothesis testing is to
determine whether there is enough statistical
evidence in favor of a certain belief about a
parameter.
Example
: Is there statistical
evidence in a random
sample of potential
customers, that support the
hypothesis that more than
10% of the potential
• States the assumption (numerical) to be tested. This
hypothesis is assumed to be true, and the collected data
will be analyzed to see
if it is contradictory to the null
hypothesis.
Research Hypothesis
“
The mean monthly cell phone bill the student of AUCA is
less than 10000 Rwf”
Example of the Null Hypothesis:
The mean monthly cell phone bill the student of AUCA is at least ten
thousand Rwf.
H
0: 10000
•
Always contains “=” , “≤” or “
” sig
•
May or may not be rejected
The Alternative Hypothesis, H
a
or
H
1
• Is the opposite of the null hypothesis
Example
– The mean monthly cell phone bill the student of
AUCA is less than 10000 Rwf
( H
a:
< 10000)
• Never contains the “=” , “≤” or “
” sign
• May or may not be accepted
• Is generally the hypothesis that is believed (or needs
to be supported) by the researcher.
This is
what
you w
ant to
Examples: Give the null hypothesis and the alternative
hypothesis
• Is there statistical evidence in a random sample of potential
customers, that support the hypothesis that more than 10% of the
potential customers will purchase a new products?
• You want to show that people find the new design for a recliner
chair more comfortable than the old design.
• You are trying to show that cigarette smoke has an effect on the
quality of a person’s life.
• The mean age of the students enrolled in evening classes at a
certain college is greater than 36 years.
• The mean weight of packages shipped on Air Express during the
past month was less than 36.7 lb.
The critical concepts are these:
1. There are two hypotheses: the null and the alternative hypotheses.
2. The procedure begins with the assumption that the null hypothesis
is true.
3. The goal is to determine whether there is enough evidence to infer
that the alternative hypothesis is true, or the null is not likely to be
true.
4. There are two possible decisions:
Reject the null: To conclude that there is enough evidence to
infer that the alternative hypothesis is true.
Fail to reject the null: To conclude that there is insufficient
evidence to support the alternative hypothesis.
Claim:
the mean life
expectancy in Africa is
over than 50.1 years
is 60:
x = 60
years
Is X=60 likely if Ho:
≤ 50.1
REJECT
Null Hypothesis
If not likely,
Hypothesis Testing Process
Suppose the
sample mean of the
Life expectancy
H0:
≤ 50.1
Ha:
> 50.1
Sample
Sample
Population
Sampling Distribution of x
≤ 50.1
If
H
0is true
If it is unlikely that we
would get a sample
mean of this value ...
... then we reject the null
hypothesis that
≤
50.1
... if in fact this were
the population mean…
x=60
Reject H0 Do not reject H0
Level of Significance,
a
•
Defines unlikely values of sample statistic if null hypothesis is true
– Defines rejection region of the sampling distribution.
•
Is designated by a , (level of significance)
– Typical values are .01, .05, or .10
•
Is selected by the researcher at the beginning.
•
Provides the critical value(s) of the test .
a
Normal
distribution
If Alpha ( )equals
0.1
0.05
0.01
One tail
Critical region
2.33
1.64
1.28
Two-tailed
H
0: μ ≥ 50.1
H
a: μ < 50.1
0
H
0:
μ
≤ 50.1
H
a:
μ
> 50.1
H
0:
μ
= 50.1
H
a:
μ
≠ 50.1
a
a
/2
Represents
critical value
Lower tail testLevel of significance =
a
0
0
a
/2
a
Upper tail testTwo-tailed test
Rejection
region is
shaded
Interpreting the p-value…
The smaller the p-value, the more statistical evidence exists
to support the alternative hypothesis.
•
If the p-value is
less than 1%,
there is overwhelming
evidence that supports the alternative hypothesis.
•
If the p-value is
between 1% and 5%,
there is a strong
evidence that supports the alternative hypothesis.
•
If the p-value is
between 5% and 10%
there is a weak
evidence that supports the alternative hypothesis.
Interpreting the p-value…
Overwhelming
Evidence
(Highly
Significant)
Strong Evidence
(Significant)
Weak Evidence
(Not Significant)
No Evidence
(Not Significant)
Actual
situation
Our
decision
Null (Ho)
hypothesis is
false
Null (Ho)
hypothesis is
true
Reject the null
(Ho) hypothesis
Correct
decision
Type I
error (α)
Called Level of Significance
Conclusions of a Test of Hypothesis…
If we reject the null hypothesis, we conclude
that there is enough evidence to infer that the
alternative hypothesis is true.
If we fail to reject the null hypothesis, we
conclude that there is not enough statistical
evidence to infer that the alternative
hypothesis is true.
This does not mean that we
n
s
μ
x
t
n
1
The test statistic is:
Using Small Samples
(The
population
must be
approximately
normal)
Steps in Hypothesis Testing
• Specify the population value of interest.
•
Assumptions
: Randomization, quantitative variable,
normal population distribution (robustness?)
• Formulate the appropriate null and alternative
hypotheses.
• Specify the desired level of significance.
• Determine the rejection region or p_value
Example 1: Lower Tail t Test for Mean
Test the claim that the true mean monthly cell phone bill the student of
AUCA is less than ten thousand Rwf. For testing this hypothesis we
took a sample of 20 students and we asked them, how much they
spend a month in charging their cell phone? The answers are shown in
the table below
1. Specify the population value of interest
Mean monthly cell phone bill the student of AUCA
2. Formulate the appropriate null and alternative
hypotheses
Ho: μ
10000
Ha: μ < 10000 (This is a lower tail test)
3. Specify the desired level of significance
Suppose that
a
= .05 is chosen for this test
Monthly cellphone
10000
800
5000
5800
4500
4873
7000
5801
5500
10000
3500
9500
2000
7800
1500
2570
500
6531
Step in SPSS
First fill the data in SPSS, them to do this, click on
Analyze
, and then
Compare means
followed by
Output from SPSS
Making decision: Reject null hypothesis because Sig. = .000 < a = .05
Interpretation: The difference found is highly significant therefore we can conclude
at 5% of significance level, there is
evidence
that supports the alternative
hypothesis, i.e. students invest in charge their phone less than ten thousand Rwf.
One-Sample Statistics
N Mean Std. Deviation
Std. Error Mean
Monthly Cell Phone 20 5194.4500 2842.31 635.56
One-Sample Test
Test Value = 10000
t df Sig. (2-tailed)
Mean Difference
95% Confidence Interval of the Difference
Lower Upper
Monthly Cell Phone -7.561 19 .000 -4805.55 -6135.79 -3475.31
•
Decision with Sig. or p_value with
a
=0.05
Example 2:
A pharmaceutical company conducts research on the efficacy of a vaccine against measles. The variable considered is the antibody titers produced by the vaccine. The vaccine produced by another laboratory reports an average titer of antibodies 1.9. To test whether the new vaccine is more effective than the older vaccine, the shot was given to 16 volunteers and obtained the following results:
Average titer of antibody 3 2.5 2.4 1.9 1.8 1.5 2.6 2.7 3.1 1.7 2.3 2.2 2.4 2.2
Steps using SPSS
To do this, click on
Analyze
, and then
Compare means
followed by
One-Sample T test
One-Sample Statistics
N Mean Std. Deviation Std. Error Mean Average titer
of antibody 16 2.225 0.5183 0.1296
One-Sample Test
Test Value = 1.9
t df
Sig.
(2-tailed) Mean Difference
95% Confidence Interval of the Difference
Lower Upper
Average titer of
antibody 2.508 15 0.024 0.325 0.049 0.601
Note : The value of p, or Sig gives us the SPSS default is bilateral, unilateral if we value: Sig /2 (.024/2 = 0.012)
Interpretation: This result indicates that the data are consistent with an average
value greater than 1.9, because the difference found is highly significant
(Sig = 0.012), therefore we can conclude that the new vaccine produced
antibody titers significantly higher than those produced by the old vaccine.
Bivariate Tests of Differences
Bivariate Tests of Differences
Involve only two variables: a variable that acts like a dependent
variable and a variable that acts as a classification variable.
Differences in mean scores between groups or in comparing
how two groups’ scores are distributed across possible response
categories.
Type of
Type of
Measurement
Measurement Differences between two Differences between two
independent groups
independent groups Differences among three or Differences among three or
more independent groups
more independent groups
Ordinal
Mann-Whitney U-test
Wilcoxon test
Kruskal-Wallis test
Nominal
Z
-test (two proportions)
Chi-square test
Chi-square test
Interval and
ratio
Independent groups:
t
-test or
Z
-test
Related or paried
groups
The
t
-Test for Comparing Two Means
Example
: Researchers are
interested in exam anxiety.
They administer an anxiety
inventory to students just
before the final exam in a
Sociology class. They also
administer it before the final
exam in a Business class. To
compare the two sets of
scores,
they
use
t-test for independent sampl
es
Example
: Researchers are
interested in exam anxiety.
They administer an anxiety
inventory on the second day of
class. Then they give it again on
the day of the midterm. To
compare the two sets of
scores,
they use
Determining when an independent samples
t-test is appropriate:
Is the dependent variable interval or ratio?
Can the dependent variable scores be grouped based upon some categorical
variable?
Does the grouping result in scores drawn from independent samples?
Are two groups involved in the research question?
Assumption when we use t test (parametric test)
Remember that for proper use of the distribution "t" or normal distribution "Z", the
data must satisfy the following assumptions:
Assume that the random samples are independent
Level of measurement of dependent variable is interval-ratio
Randomness: samples were selected using a probabilistic method. Otherwise
inference is not applied.
Normality: The variables of analysis, in both populations are normally
distributed. (Boxplot, histogram with normal curve, Normal Q-Q plot,
Shapiro-Wilk, KS, etc.). If not satisfy these conditions do using a nonparametric test or
you transform your variable .
Homogeneity of variances: The population variances are not different. That is:
(Levene test, F, etc.). If not corrected the number of degrees of freedom and
used the t test cuff applies a nonparametric test. When samples are very unequal
Example for hypothesis testing between two independent groups
A cigarette maker analyzes two different brands for determining the nicotine
content. A sample was taken of each brand and got the following results (in
milligrams).
Brand A:
24
26
25
22
23
Brand B:
27
28
25
29
26
Do the above results indicate that there is a difference in the average content of
nicotine in both brands?
Solution
Formulate the appropriate hypotheses:
Step using SPSS (Create data file)
Enter the data in SPSS, with the variable “Nicotine” takes up one column, and the
Brand variable for identifying whether the nicotine data was from brand A or brand
B subject takes up another column.
The “Nicotine” is considered as the dependent, response or outcome variable,
and the “Brand” variable is the independent or factor variable. The two variables
should be created in the way as seen in the data editor on the right. The Brand
variable takes on two possible values, 1 or 2. The value “1” for brand A, and the
value “2” for brand B.
B A
Ho
:
B A
Step in SPSS for hypothesis testing between two independent groups
To do this, click on
Analyze
, and then
Compare means
followed by
independent samples T test
and then continue the followed steps as
shown in the figure below < continue < OK
Interpretation: the report shows the descriptive statistics, the average content of
nicotine of Brand A is less than the average of Brand B, and standard deviation
for both are similar; but do not know whether this difference observed is
significant.
So we ask the t test for independent samples, which we gives t = -3.00, looking at the next Sig. (2-tailed) the value is .017, lower than .05.
Decision rule: Sig <0.05, therefore the level of significance of 5% we can say the results
indicate that there is a difference significant in the average content of nicotine in both brands,
Assumption
Basic assumptions:
To check if the variable is normally distributed, the following steps in the SPSS
Analyze <descriptive statistics <explore <follow the steps as shown in the figure below <accept
Box plot (to check if there are no outlier values and if
the boxes behave
Assumption
Assumption
Tests of Normality
Cigarette Brand
Kolmogorov-Smirnova Shapiro-Wilk
Statistic df Sig. Statistic df Sig. Nicotine Brand A .136 5 .200* .987 5 .967
Brand B .136 5 .200* .987 5 .967
a. Lilliefors Significance Correction
Making a Decision and Interpreting the Result of the Test
We observed Shapiro-Wilk statistic given that the samples are small
The p_values or (Sig.)
Brand A: Sig, 967
Brand B: Sig, 967
Decision: From Shapiro-Wilk test of normality are both Sig. greater than 0.05,
therefore we don’t reject Null hypothesis, which imply that it is acceptable
to assume that the average content of nicotine distributions for
Brand A and Brand B populations are both normal (or bell-shaped).
Hypothesis testing to determine the normality
Assumption
Assumption of Homogeneity
Through the Levene test can see if this assumption very important to compare
groups met.
The report of SPSS gives without asking
Ho: the variances are equal
Ha: not assume equal variances
Example data from SPSS (This example uses the file
creditpromo.sav from SPSS
Analyze > Compare Means >
Independent>
► Select $
spent during promotional
period as the test variable.►
Select Type of mail insert
received as the grouping
variable.► Click Define
Groups.
T test > Independent-Sample t
test > Testing Two
independent Sample Means>
Running the Analysis
An analyst at a department store wants to evaluate a recent credit card
promotion. To this end, 500 cardholders were randomly selected. Half received
an ad promoting a reduced interest rate on purchases made over the next three
months, and half received a standard seasonal ad.
SPSS Report
Group Statistics
Type of mail insert
received N Mean DeviationStd. Std. Error Mean
$ spent during promotional period
Standard 250 1566.3890 346.67305 21.92553 New Promotion 250 1637.5000 356.70317 22.55989
The Descriptive table displays the sample size, mean, standard deviation, and standard error for both groups. On average, customers who received the interest-rate promotion charged about $71 more than the comparison group, and they vary a little more around their average.
The procedure produces two tests of the difference between the two groups. One test assumes that the variances of the two groups are equal. The Levene statistic tests this assumption.
Levene's Test for Equality of Variances
F Sig. $ spent during
promotional period
Equal variances
assumed 1.19 0.276 Equal variances not
Example Cont’d
Independent Samples Test
Levene's Test for Equality of
Variances t-test for Equality of Means
F Sig. t df
Sig.
(2-tailed) DifferenceMean
Std. Error Difference
$ spent during promotional period
Equal variances
assumed 1.19 0.276 -2.26 498 0.024 71.11095 31.45914 -Equal variances
not assumed -2.26 497.595 0.024 -71.11095 31.45914
The “t” column displays the observed t statistic for each sample, calculated as the ratio of the difference between sample means divided by the standard error of the difference (t = -2.26).
The df column displays degrees of freedom (498). For the independent samples t test, this equals the total number of cases in both samples minus 2.
The column labeled Sig. (2-tailed) displays a probability from the t distribution with 498 degrees of freedom (Sig = .024). The value listed is the probability of obtaining an absolute value greater than or equal to the observed t statistic, if the difference between the sample means is purely random.
The Mean Difference (-71.11095) is obtained by subtracting the sample mean for group 2 (the New Promotion group) from the sample mean for group 1.
Hypothesis test for Dependent sampling – matched pairs
t-test (paried or related samples)
One of the most common experimental designs is the "pre-post" design. A study of this type often consists of two measurements taken on the same subject, one before and one after the introduction of a treatment or a stimulus. The basic idea is simple. If the treatment had no effect, the average difference between the measurements is equal to 0 and the null hypothesis holds. On the other hand, if the treatment did have an effect (intended or unintended!), the average difference is not 0 and the null hypothesis is rejected.
Example for paired comparisons or related
Athlete
Weight
before
Weight
after
1
127
135
2
195
200
3
162
160
4
170
175
5
143
147
6
205
200
7
168
172
8
175
186
9
197
194
10
136
130
10 athletes were subjected to a program of intensive physical training
by the coach. Their weights were recorded (in pounds) before and after
the training with the following results:
Does it affect the program the average
Output from SPSS
Paired Samples Statistics
Mean
N
Std. Deviation Std. Error Mean
Pair 1
After
172.70
10
23.386
7.395
Before
167.80
10
26.578
8.405
Interpretation: the report shows the descriptive statistics, the average being (before) is less than the average after implementing the training, but do not know whether this difference observed is significant.
Paired Samples Test
Paired Differences t df Sig. (2-tailed) Mean Std. Deviation Std. Error Mean 95% Confidence Interval of the
Difference Lower Upper Pair 1 Weight_Before
- Weight_After -4.900 6.740 2.132 -9.722 -.078 -2.299 9 .047
1. A firm is to buy a fleet of cars for use by its salesmen and wishes to chose between two alternative models, A and B. it places an advertisement in a local paper offering 20 liters of petrol free to anyone who has bought a new car of either model in the last year. The offer is conditional on being willing to answer a questionnaire and to note how far the car goes, under typical driving conditions, on the free petrol supplied. The following data were obtained.
Km driven on 20 liters of petrol
Model A
187
218
173
235
Model B
157
198
154
184
202
174
146
173
Conduct the appropriate statistical test of your hypothesis, using a .05 statistical significance level.
Review problems of chapter
2. A group of ten patients who were newly detected diabetes was observed to determine whether an educational program was effective in increasing their knowledge of diabetes. A test was applied before and after the educational program on self-related aspects of the disease. The test results were as follows:
Patient 1 2 3 4 5 6 7 8 9 10
Before 75 62 67 70 55 59 60 64 72 59
After 77 65 68 72 62 61 60 67 75 68
3. In 2014, consumer reports gave the following prices for a sample of 19 cellular cell phones:
Review problems of chapter
4. A company wants to study the effect of the break from work on the productivity of their workers. Select 5 workers and their productivity measured in an ordinary day, and then measure the productivity of workers in the same 5 day granting the break from work. The measured productivity figures are as follows:
Do they indicate these results that the break from work increase productivity?
600 300 289 499 615 279
255 612 353 530 322 375
475 425 445 580 250 399
Assuming a normally distributed population, test the hypothesis at the .05 level that the population mean price for cellular phones at the time of this survey was more than $350 •Conduct the appropriate statistical test of your hypothesis, using a .05 statistical significance level.
Worker Without pause With pause
1 23 28
2 35 38
3 29 39
4 33 37
Bivariate Tests of Differences
5. They have total cholesterol levels of a sample of eight patients before and after participating in a
diet-exercise program. Can be concluded that the program had positive impact?
Patient Before After
1 201 200
2 231 236
3 221 216
4 260 233
5 228 224
6 237 216
7 326 296
8 235 195
Basketball players 90 70 55 60
Football players 95 60 45 49
6. Do athletes in different sports vary in terms of intelligence? Bellow is reported
College Board scores of random samples of colleges’ basketball and football players. Is there a significant difference?
Do your best to present yourself to God as one approved, a worker who
does not need to be ashamed and who correctly handles the word of truth