BNET Procedure
Independence Tests
Both variable selection and structure learning require either independence tests between two variables or conditional independence tests given some other variables. PROC BNET supports independence tests by using the chi-square statistic, G-square statistic, normalized mutual information, or some combination of them.
Given two nominal variables X and Y (or interval variables after binning) that have levels r and c, respectively, the chi-square statistic is computed as
where is an observed frequency in a cell of the contingency table of the two variables and
is the expected frequency of the cell. The degrees of freedom for the test is
. If the p-value of the test statistic is greater than the specified significance level, the two variables are considered to be independent.
Similarly, the G-square statistic is calculated as
where is an observed frequency,
is the expected frequency, and the degrees of freedom for the test is
. If the p-value of the test statistic is greater than the specified significance level, the two variables are considered to be independent.
The mutual information between X and Y is defined as
where is the joint distribution function of X and Y;
and
are the marginal probability distributions of X and Y, respectively; and N is the total number of observations in the training data.
The mutual information is then normalized to be between 0 and 1 as
where is the mutual information between X and Y.
If the value of the normalized mutual information is less than the specified significance level, the two variables are considered to be independent.
To test the conditional independence between two variables X and Y given a subset S of other variables ( and
), the corresponding statistics are summed for each value combination of S, and the corresponding degrees of freedom for the chi-square and G-square statistics is
, where q is the number of value combinations for S.
The following PROC BNET options are related to independence tests:
The INDEPTEST= option specifies which test statistic or combination of them to use.
The ALPHA= option specifies the significance level for the chi-square and the G-square statistics.
The MIALPHA= option specifies the significance level for the normalized mutual information.