k nearest neighbor algorithm is a widely used classifier. It benefits from distances among features to classify the data. Classifiers based on distance metrics are affected from irrelevant or redundant features. Especially, it is valid for big datasets. So, some of features can be weighted with higher coefficients to reduce the effect of irrelevant or redundant features. We suggest adaptive weighted k nearest neighbor algorithm to increase classification accuracy. This algorithm uses t test which is one of the feature selection to weight features. Classification accuracy is increased from 74.14% to 86.57% for k=3 neighbors and Euclidean distance metric thanks to the proposed method.