Download Tutorial 6

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
TUTORIAL 6
________________________________________________________________________

THEORY IN SUMMARY
Null Hypothesis ( H 0 )-Alternative Hypothesis ( H  )
The null hypothesis is the one whose false rejection creates the more serious error.
Sometimes elementary textbooks write that what we would like to prove goes as the
alternative hypothesis. This may be misleading. There are simple and composite
hypotheses. The rejection region of the test is denoted by C and the test function is
denoted by φ(x) and takes the value 1 when x belongs to C, 0 otherwise.
Type I & II errors
Type I error is when we reject the null hypothesis when it is true. The probability of the
Type I error is denoted by the Greek letter α. Type II error is when we fail to reject the
null hypothesis when the alternative hypothesis is true. The probability of the Type II
error is denoted by the Greek letter β. The quantity γ=1-β is called the power of the test.
The quantity α is called level of significance of the test and is regarded as the more
serious error probability. Since both α and β cannot be minimized simultaneously, we
keep α fixed at a small value.
Most Powerful Tests
The test that among all test of level of significance α, the one that achieves the biggest
power is called the most powerful test. If we have composite hypotheses this is called a
uniformly most powerful test.
Neyman-Pearson Lemma
When we test simple null hypothesis vs simple alternative hypothesis most powerful test
function is the following:

L0
k
1,
L
1


L0
( x)  l ,
k
L
1


L0
k
0,
L1

where k>0 and l ( 0  l  1) are defined in such a way as to give a test of size α. In many
cases
As an example consider the case of H 0 :    0 vs H a :    a , where     0 . The



z 
critical region C is defined in the following way: C   x : x  0 
n 

SPSS application
In SPSS, hypothesis testing is conducted through the Analyze (Statistics in earlier
versions) menu. Then we go to Compare means and then to One Sample T-test (or
1
Independent Samples T-test if we have more than one population). We insert the
variable(s) to be tested and the test value(s). The level of significance is determined
through the Options choice (default α=5%). The output is the following (red letters are
comments):
________________________________________________________________________
T-Test (not necessarily a t-test, it can be a z-test as well, just what SPSS puts
as a title)
One-Sample Statistics
(descriptive statistics for the variable X=Engine Displacement)
N Mean Std. Deviation Std. Error Mean
(S)
(S/ N )
Engine Displacement
406 194.04
105.21
5.22
One-Sample Test (test results)
Test Value = 0
( H 0 : μ=0)
t
(value of the
test statistic)
Engine
Displacement
df
37.163 405
Sig. (2Mean
tailed)
Difference
p-value for
( H :   0 )
.000
(very small)
194.04
95% Confidence
Interval of the
Difference
Lower Upper
183.78 204.30
Result: The test is statistically significant. Reject the null hypothesis at level of
significance 5% or 1%. The confidence interval confirms this result. This was expected
since the sample mean had a value so much bigger than 0. The Sig(2-tailed) column
denotes the p-value for a two tailed t-test which is an easy way to reject or not the null
hypothesis. If the p-value is less than α as it is here then we reject the null hypothesis.
Otherwise we fail to reject the null hypothesis.
________________________________________________________________________

EXERCISES
1.
2.
3.
Roussas, volume II, page 30, exercise, 1.5
Roussas, volume II, page 31, exercise, 1.9
Roussas, volume II, page 32, exercise, 1.16
4.
Show that in the hypotheses testing of H 0 :    0 vs H  :     , where
    0 from a normal distribution with σ known, the sample size n is given by:
2
n
5.
 2 ( z   z ) 2
(    0 ) 2
When you are looking for a job you would like to find a company that meets one
or more of the following criteria.
 First of all you wish that on average the starting salary be significantly higher
than (i) $15000 (ii) $20000.
 Another criterion is that the average current salary of the employees be
significantly higher than $30000.
 You have a total of (i) 5 years (ii) 7.5 years of previous experience.
Therefore, the average previous experience of the employees should not be
significantly different from your qualifications.
 Finally, you don't want the company to have significant salary differences
between minority-non-minority and male-female employees.
The SPSS file employee data contains salary data for the company A. Based on
each criterion would you apply for a job there? Justify your answer for each
criterion using SPSS or any other software (Excel-S+).
3