Difference between revisions of "Manuals/calci/LEVENESTEST"

From ZCubes Wiki
Jump to navigation Jump to search
Line 23: Line 23:
 
*The Levene test statistic is:
 
*The Levene test statistic is:
 
<math>W=\frac{(N-k)\sum_{i=1}^k N_i(Z_i-Z)^2}{(k-1)\sum_{i=1}^k \sum_{i=1}^k \sum_{j=1}^{N_i} (Z_{ij}-Z_i)^2}</math>.
 
<math>W=\frac{(N-k)\sum_{i=1}^k N_i(Z_i-Z)^2}{(k-1)\sum_{i=1}^k \sum_{i=1}^k \sum_{j=1}^{N_i} (Z_{ij}-Z_i)^2}</math>.
*where <math>W< is the result of the test, k is the number of different groups to which the sampled cases belong,N is the total number of cases in all groups,Ni is the number of cases in the th group, Yij is the value of the measured variable for the jth case from the ith group.Zij is satisfying the one of the following conditions:1.(Formula)Where yi(bar)is the Mean of the ith subgroup.2.(Formula)Where yi(bar)is the Median of the ith subgroup3.(Formula)Where yi(bar)is the 10%Trimmed Mean of the ith subgroup.subgroup. Levene's Testing Procedure:1. checking the assumptions.2.State the Null(H0) and alternative(H1) hypothesis.3.Decide on the Significance level (α).4.Finding the Critical value and Rejection Region.Here df1=t-1 ,df2=N-t.5.Compute the Levenes statistic using the formula.6.Then decision of  the value of the test statistic, FLevene, falls in the rejection region or if p-value ≤ α, then reject H0 ;
+
**where <math>W</math> is the result of the test.
otherwise, fail to reject H0 .For the computation p-value we have to use the value of df1 and df2.7. Finally we have to conclude that the rejection of H0 or fail to rejection H0 according to the test statistic at the significance level.
+
**<math>k</math> is the number of different groups to which the sampled cases belong.
 +
**<math>N</math> is the total number of cases in all groups.
 +
**<math>N_i</math> is the number of cases in the <math>i^th</math> group.
 +
**<math>Y_{ij} is the value of the measured variable for the <math>j_th</math> case from the <math>i^th</math> group.
 +
*Zij is satisfying the one of the following conditions:
 +
*1.<math>z_{ij}=|y_{ij}-\bar{y_i}|</math>,Where <math>\bar{y_i}</math> is the Mean of the <math>i^th</math> subgroup.
 +
*2.<math>z_{ij}=|y_{ij}-\bar{y_i}|</math>,Where <math>\bar{y_i}</math> is the Median of the <math>i^th</math> subgroup
 +
*3.<math>z_{ij}=|y_{ij}-\bar{y_i}|</math>,Where <math>\bar{y_i}</math> is the 10%Trimmed Mean of the <math>i^th</math> subgroup.
 +
*Levene's Testing Procedure:
 +
*1. checking the assumptions.
 +
*2.State the Null(H0) and alternative(H1) hypothesis.
 +
*3.Decide on the Significance level (α).
 +
*4.Finding the Critical value and Rejection Region.Here <math>df_1=t-1</math>,<math>df_2=N-t</math>.
 +
*5.Compute the Levenes statistic using the formula.
 +
*6.Then decision of  the value of the test statistic,W is falls in the rejection region or if p-value ≤ α, then reject <math>H_0</math>.Otherwise, fail to reject <math>H_0</math>. For the computation p-value we have to use the value of <math>df_1</math> and <math>df_2</math>.
 +
*7. Finally we have to conclude that the rejection of <math>H_0</math> or fail to rejection <math>H_0</math> according to the test statistic at the significance level.
 +
 
 +
==Example==

Revision as of 04:24, 30 April 2014

LEVENESTEST(xRange,ConfidenceLevel,LogicalValue)


  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle xRange} is the set of values for the test.
  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle ConfidenceLevel} is the value from 0 to 1.
  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle LogicalValue} is either TRUE or FALSE.

Description

  • This function used to test the Homogeneity of variances.
  • Levene's test is used to test the Samples have equal variances.
  • Equal variances across samples is called homogeneity of variance or homoscedasticity.
  • To do the Levenes test we need the following assumptions:
  1.The Samples from the populations are independently of one another. 
  2. The population under consideration are Normally Distributed. 
  • For three or more variables the following statistical tests for homogeneity of variances are commonly used:
   1.Levene's Test.
   2.Bartlett Test.
  • Levene's test is an alternative to the Bartlett test.
  • If the data surely is of normally distributed or nearly to normally distributed then we can use the Bartlett test.
  • The Levene's test is defined as
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H_0=\sigma_1^2=\sigma_2^2=......=\sigma_t^2}
.
=Not all of the variances are equal. 
  • Normally there are three versions of the Levenes test.
  • There are 1.Use of Mean.2.Use of Median.3.Use of 10% of Trimmed Mean.
  • The Levene test statistic is:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle W=\frac{(N-k)\sum_{i=1}^k N_i(Z_i-Z)^2}{(k-1)\sum_{i=1}^k \sum_{i=1}^k \sum_{j=1}^{N_i} (Z_{ij}-Z_i)^2}} .

    • where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle W} is the result of the test.
    • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle k} is the number of different groups to which the sampled cases belong.
    • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N} is the total number of cases in all groups.
    • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N_i} is the number of cases in the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle i^th} group.
    • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Y_{ij} is the value of the measured variable for the <math>j_th} case from the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle i^th} group.
  • Zij is satisfying the one of the following conditions:
  • 1.Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle z_{ij}=|y_{ij}-\bar{y_i}|} ,Where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \bar{y_i}} is the Mean of the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle i^th} subgroup.
  • 2.Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle z_{ij}=|y_{ij}-\bar{y_i}|} ,Where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \bar{y_i}} is the Median of the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle i^th} subgroup
  • 3.Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle z_{ij}=|y_{ij}-\bar{y_i}|} ,Where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \bar{y_i}} is the 10%Trimmed Mean of the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle i^th} subgroup.
  • Levene's Testing Procedure:
  • 1. checking the assumptions.
  • 2.State the Null(H0) and alternative(H1) hypothesis.
  • 3.Decide on the Significance level (α).
  • 4.Finding the Critical value and Rejection Region.Here Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df_1=t-1} ,Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df_2=N-t} .
  • 5.Compute the Levenes statistic using the formula.
  • 6.Then decision of the value of the test statistic,W is falls in the rejection region or if p-value ≤ α, then reject Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H_0} .Otherwise, fail to reject Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H_0} . For the computation p-value we have to use the value of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df_1} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df_2} .
  • 7. Finally we have to conclude that the rejection of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H_0} or fail to rejection Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H_0} according to the test statistic at the significance level.

Example