Two sample inference for high dimensional data and nonparametric variable selection for census data