In biomedical studies, detecting the changes in a response distribution under different testing conditions is one of the important issues. For example, increase in dose level may lead to increase or decrease in the gene expression level. To address this issue, we propose a nonparametric Bayesian test for testing the difference in location when samples are collected under two different conditions. We apply Dirichlet process priors to estimate the probabilities, which imply constraint on cumulative distribution functions of occurrence evaluated at cut‐off value that partitions the expression range of that gene into two intervals. The proposed test can be easily extended for multiple samples comparisons in gene expression analysis.