Statistics-Non parametric test

1,773 views 25 slides Jan 09, 2018
Slide 1
Slide 1 of 25
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25

About This Presentation

It includes all the important formulas and techniques need to carry out the calculations of statistics.


Slide Content

Non-Parametric Test 1 Presented by: Group-E (The Anonymous) Gagan Puri Bikram Bhurtel Rabin B.K Bimal Pradhan

Contents What is parametric test? What is non-parametric test ? Difference between parametric and non-parametric test Chi-square test ( ) Run test Sign test Kolmogorov Smirnov test Cochran Q. test Friedman F. test References   2

What is non-parametric test? Parametric tests involve estimation parameters such as the mean and assume that distribution of sample means are normally distributed Non parametric tests were developed for these situations where fewer assumptions have to be made Some times called distribution free tests There are some assumptions in nonparametric test but are of less stringent 3

S/n Parametric test S/n Non parametric test 1 It specifies certain condition about parameter of the population from which sample is selected. 1 It doesn't specifies certain condition about parameter of the population from which sample is selected. 2 It is used in testing of hypothesis and estimation of parameters. 2 It is used in testing of hypothesis but not in estimation of parameters. 3 Mostly it is used in data measured in interval and ratio scale. 3 It is used in data measured in nominal and ordinal scale. 4 It is most powerful 4 It is less powerful 5 It requires complicated sampling technique 5 It doesn’t require complicated sampling techinque . Difference between parametric and non-parametric test

Used to test significant difference between observed frequencies and expected frequencies Let ‘n’ be the observation of the random variable x and classified k (no) of classes WRT frequencies Problem to test: Chi-square test 5    

  Test statistics If be the the level of significance and (k-1) be degree of freedom then critical value is obtained from table Decision: then we reject the null hypothesis otherwise accepted   If  

Run test Sequence of letter of one kind bounded by letter of other kind is called run ++++++++----------+++++++-------+++--- here no. of run = 6 Test used for testing the randomness of sequence of sample event Problem to test:- Hₒ: The sequence are in random order Hˌ: The sequence are not in random order 7

Methods of run test For small sample size (n 1 ,n 2 ≤ 20) Test statistics : number of runs (r) Level of significance : α=0.05 unless we are given Critical value : ṟ and ȓ obtained from the table according to α , degree of freedom n 1 and n 2 and alternative hypothesis Decision : accept Hₒ at a level of significance if r ϵ ( ṟ,ȓ ), reject otherwise 8

Example: HH TTT H T HHH TT HH T no. of heads (n 1 )=8, no of tails (n 2 )= 7, no. of runs (r)=8 Problem to test : Hₒ : the sequence are in random order Hˌ : the sequence are not in random order Test statistics: r=8 Critical value : at α =0.05, n 1 =8 and n 2 =7, ṟ=4 and ȓ=13 Decision : r=8 ϵ (ṟ=4, ȓ=13), accept Hₒ Conclusion : the sequence of H and T are in random order. 9

10

For large sample size (n 1 , n 2 ≥ 20) r is approximately normally distributed with mean, և = + 1 and variance , σ² = Test statistics z = ~ N(0,1) Level of significance : α=0.05 , unless we are given Critical value : z is obtained from table according to level of significance and alternative hypothesis Decision: accept Hₒ if |z |< z tabulated , reject otherwise   11

Example: 46,58,60,56,70,66,48,54,62,41,39,52,45,62,53,69,65,65,67,76, 52,52,59,59,67,51,46,61,40,43,42,77,67,63,59,63,63,72,57,59, 42,56,47,62,67,70,63,66,69 and 73 Here sample size (n)=50, median=59.5 assign A >median, B <median , delete if number=median Thus, the sample becomes: BB A B AA BB A BBBB A B AAAAA BBBB A BB A BBB AAA B AAA BBBBB AAAAAAA no. of A (n1)=25, no. of B (n2)=25, r=20 և = + 1 = 26 and σ² = = 12.2 σ = = 3.5   12

Problem to test: Hₒ : sample are in random order Hˌ : sample are not in random order. Test statistics : z=(r- և )/σ =(20-26)/3.5 = -1.71 Critical value : At α =0.05, z tabulated = 1.96 Decision: |z|=1.71< z tabulated =1.96, we accept Hₒ at α =0.05 Conclusion: The sample are in random order. 13

Based on the direction of differences between two measures Test statistic Under test statistic is, = minimum of n(+) or n (-) Critical region: K = Decision : Null hypothesis is rejected if K otherwise accepted Two types of sign test: Small sample case (n 25 ) Large sample case ( n > 25 )   Sign test 14

Example: A study was designed to determine the effect if a certain movie on the moral attitude of young children. The data below represents a rating from 0 to 20 on a moral attitude to high morality. Carry out the test hypothesis that movie had no effect on moral attitude of children against it had using sign test at level 0.1. [T.U 2069] 15 Before 14 16 15 18 15 17 19 17 17 16 14 15 After 13 18 16 17 16 19 20 18 19 15 18 16

Solution 16 Before 14 16 15 18 15 17 19 17 17 16 14 15 After 13 18 16 17 16 19 20 18 19 15 18 16 Sign + - - + - - - - - + - - Null Hypothesis ( ): = i.e. , movie has effect on moral attitude of children Alternative hypothesis ( ): , i.e., movie has no effect on moral attitude of children Number of + signs (+) = 3 Number of – signs (-) = 9 Test statistic: = min{n(+),n(-)} = min {3,9} = 3 Critical value: K = = = 2.1051 For 0.1 level of significance, P-value( ) = P(y = 0.073 Decision: Since , =0.073<0.1= K, we reject null hypothesis, i.e., movie has effect on moral attitude of children   Here, n>25 so K =  

Alternate of Chi-square test for goodness of fit when sample size are small Test statistic: = Max Decision: Accept , if (calculated) < (tabulated)   17 Kolmogorov Smirnov test

Example: The number of disease infected tomato plants in 10 different plots of equal size are given below: Test whether the disease infected plants are uniformly distributed over the entire area using Kolmogorov Smirnov test. Plot no: 1 2 3 4 5 6 7 8 9 10 No. of infected plants 8 10 9 12 13 7 5 12 13 9 Two tailed test = Md = Infected plants are uniformly distributed Md = Infected plants are not uniformly distributed   Solution: 18

19 Plot no No. of infected plants ( ) C Relative observed frequency Expected frequency C Expected relative frequency ( ) 1 8 8 8/100 10 10 10/100 0.02 2 10 18 18/100 10 20 20/100 0.02 3 9 27 27/100 10 30 30/100 0.03 4 12 39 39/100 10 40 40/100 0.01 5 15 54 54/100 10 50 50/100 0.04 6 7 61 61/100 10 60 60/100 0.01 7 5 66 66/100 10 70 70/100 0.04 8 12 78 78/100 10 80 80/100 0.02 9 13 91 91/100 10 90 90/100 0.01 10 9 100 100/100 10 100 100/100 1 Plot no 1 8 8 8/100 10 10 10/100 0.02 2 10 18 18/100 10 20 20/100 0.02 3 9 27 27/100 10 30 30/100 0.03 4 12 39 39/100 10 40 40/100 0.01 5 15 54 54/100 10 50 50/100 0.04 6 7 61 61/100 10 60 60/100 0.01 7 5 66 66/100 10 70 70/100 0.04 8 12 78 78/100 10 80 80/100 0.02 9 13 91 91/100 10 90 90/100 0.01 10 9 100 100/100 10 100 100/100 1

Test statistic: Calculated = Max = 0.04 = Tabulated = 0.136 Decision : Since calculated = 0.04 < tabulated = 0.136, we accept null hypothesis, i.e., the infected plants are uniformly distributed.   20 Since n>40, t abulated = = = = 0.136  

21

Cochran Q test Non-parametric test used or more than two related samples. Use to test significance difference in frequencies or properties of given samples. Problem to test:- Hₒ:- All the treatment are equally effective. H i :- All the treatment are not equally effective Test statistics: Decision :- Reject Hₒ if Q > Q = df  

Friedman F test Used to test significant different between location of three or more populations. Problem to test:- Hₒ:- Md ₁ = Md ₂ = Md ₃= Md k H 1 :- at least one md is different, I=1,2,3,……,k Test statistics :- Decision :- Accept H if p > or reject   = - 3n (k+1)   =  

R eferences: Probability and Statistics (Course book) Teachers note google.com wikipedia.com 24

25 Queries