# Test the difference between average value of 2 random variables

I am doing an exercise on marketing analysis to determine the strategy that a brand should follow based on historical weekly data collected from supermarkets that sell the brand (let say brand1) and 4 other competitors' products (brand2, 3, 4 and 5 respectively). The weekly data contains sales, average price ... of each brand by period, week and store number.

I want to analyse that whether brand 3 is doing better than our brand (brand 1) on average weekly sales. I am thinking about the two sample student's t-test. $$H_0$$ would be $$\mu_3 - \mu_1 \ge 0$$ and $$H_1$$ would be $$\mu_3 - \mu_1 < 0$$. ($$\mu_3, \mu_1$$ are the mean of weekly sales of brand 3 and brand 1 respectively).

Firstly, using a Fisher’s F-test to verify the homogeneity of variances. If the p-value is less than the significance level or if the F-value is less than the tabulated F-value, then we accept the null hypothesis of homogeneity of variances.

Secondly, implement the t-test for homogeneous variances. But I don't know what to do in case the null hypothesis $$H_0$$ is $$\mu_3 - \mu_1 \ge 0$$ (instead of $$\mu_3 - \mu_1 = 0$$).

Could anyone please help me on this case? Is there any other test more suitable to perform on this problem and if two sample t-test is applicable for the situation, what I need to do since the null hypothesis is $$\mu_3 - \mu_1 \ge 0$$ ?

Thank you so much in advance!

• Unless you have clear evidence data are not normal, you should use a Welch (separate-variances) t test. Testing for equal variances and then branching to a pooled t test (if equality of variances not rejected) or the Welch test (if rejected) is a deprecated practice. Unless sample sizes are very low, any loss of power using the Welch test will be negligible, even if population variances are in fact identical. // If data are far from normal, then choose a nonparametric alternative to the Welch test. – BruceET Sep 30 '18 at 18:07
• @Bruce Why would the criterion be "clear evidence of non-normality"? For one thing, such evidence would often only be clear in relatively large samples, but the effects of it could be substantial in small samples. – Glen_b Oct 1 '18 at 17:16
• I agree "far from normal" is fuzzy, but didn't intend it as quantitative technical terminology. For small samples, I guess the usual phrase to advise against t tests is "extreme skewness or several far outliers", but that's also vague and formal tests are unhelpful for really small samples. For large samples, the t test is remarkably robust against non-normality. Do you know a reliable rule for when to use nonparametric tests on large samples? – BruceET Oct 1 '18 at 21:47
• ... Many times I've used t-statistic as metric in a permutation test when a moderately large dataset (say, $n=30$ to $100$) seemed "clearly nonnormal" only to find that the permutation distribution was close to t -- especially in the tails to find P-values. – BruceET Oct 1 '18 at 21:48
• @Glen_b and BruceET Thank you for sharing your insights!! I would want to find a textbook that clearly describes the tests and their respective strengths and limitations. Do you have any recommendation for that? Thanks so much again!! – Sophil Oct 3 '18 at 22:38