# Could z-test test percentage difference between means of two sample groups?

Problem: I have two sample groups(A and B), each with more than 30 samples. I want to know if the mean of A is 5% more than mean of B. Is z test a proper way to go here?

Online I found most of z test is testing hypothesis that if mean of A and B are different or not at confidence level of say 95%, but not testing if they are different for more than x%. Could anyone suggest a way here? Thanks a lot!

You can just use the normal formula, but subtracting .05 from the numerator. That is, where $p_A$ and $p_B$ are the two proportions, the numerator can be written as $p_A - p_B$, and you can replace this with $p_A - p_B - 0.05$.