Q1.A cooperative store is interested in knowing whether there is any significant difference between the buying habits or male and female shoppers.samples of 14 males and 16 female shoppers gave the following information:

male=62,38,43,79,77,23,11,52,33,41,70,49,69,43.
female=93,101,72,118,100,45,68,72,47,83,92,106,63,66,85,81.
use median test to verify whether there is any reason to suppose that the two population are different.

https://www.google.com/search?client=safari&rls=en&q=median+test&ie=UTF-8&oe=UTF-8&gws_rd=ssl

full solution od this question

To determine if there is a significant difference between the buying habits of male and female shoppers, we can use the median test. The median test compares the medians of two or more groups to determine if they are significantly different.

Step 1: State the null and alternative hypotheses:
- Null Hypothesis (H0): There is no significant difference between the buying habits of male and female shoppers.
- Alternative Hypothesis (Ha): There is a significant difference between the buying habits of male and female shoppers.

Step 2: Determine the number of males (n1) and females (n2) in the samples:
- n1 = 14 (number of male shoppers)
- n2 = 16 (number of female shoppers)

Step 3: Calculate the median for each group:
- For the male shoppers: median_male = median(62, 38, 43, 79, 77, 23, 11, 52, 33, 41, 70, 49, 69, 43) = 49
- For the female shoppers: median_female = median(93, 101, 72, 118, 100, 45, 68, 72, 47, 83, 92, 106, 63, 66, 85, 81) = 80

Step 4: Rank the combined data from both groups in ascending order, while keeping track of the group they belong to:
- Combined data = {11, 23, 33, 38, 41, 43, 43, 45, 47, 49, 52, 62, 63, 66, 68, 69, 70, 72, 72, 77, 79, 81, 83, 85, 92, 93, 100, 101, 106, 118}

Step 5: Calculate the sum of the ranks for each group:
- sum_ranks_male = sum of ranks for male shoppers = 1+2+3+4+5+6+7+8+9+10+11+12+13+14 = 105
- sum_ranks_female = sum of ranks for female shoppers = 15+16+17+18+19+20+21+22+23+24+25+26+27+28+29+30 = 465

Step 6: Calculate the expected sum of ranks for each group under the assumption of no difference:
- expected_sum_ranks_male = (n1 * (n1 + n2 + 1)) / 2 = (14 * (14 + 16 + 1)) / 2 = 210
- expected_sum_ranks_female = (n2 * (n1 + n2 + 1)) / 2 = (16 * (14 + 16 + 1)) / 2 = 270

Step 7: Calculate the test statistic:
- test_statistic = (sum_ranks_male - expected_sum_ranks_male) / sqrt((n1 * (n1 + n2) * (n1 + n2 + 1)) / 12) + (sum_ranks_female - expected_sum_ranks_female) / sqrt((n2 * (n1 + n2) * (n1 + n2 + 1)) / 12)

Step 8: Determine the critical value for the test statistic at the chosen significance level (e.g., α = 0.05) and degrees of freedom (df = 1).
- Look up the critical value in the chi-square distribution table or use software to find the critical value.

Step 9: Compare the test statistic with the critical value:
- If the test statistic is greater than the critical value, reject the null hypothesis.
- If the test statistic is less than or equal to the critical value, fail to reject the null hypothesis.

This completes the step-by-step process for performing the median test to determine if there is a significant difference between the buying habits of male and female shoppers.

To use the median test to verify whether there is any reason to suppose that the buying habits of male and female shoppers are different, we need to follow these steps:

Step 1: Define the Null Hypothesis (H0) and Alternative Hypothesis (Ha):
- H0: There is no significant difference between the buying habits of male and female shoppers.
- Ha: There is a significant difference between the buying habits of male and female shoppers.

Step 2: Calculate the median for each group:
- Median for male shoppers: Arrange the data in ascending order: 11, 23, 33, 38, 41, 43, 43, 49, 52, 62, 69, 70, 77, 79. The median is the middle value, which is 49.
- Median for female shoppers: Arrange the data in ascending order: 45, 47, 63, 66, 68, 72, 72, 81, 83, 85, 92, 93, 100, 101, 106, 118. The median is the middle value, which is 81.

Step 3: Calculate the test statistic:
- The test statistic for the median test is given by the following formula:
test statistic = [(total number of observations from the smaller group) * (median of the larger group) - (total number of observations from the larger group) * (median of the smaller group)] / sqrt(N1 * N2 * (N1 + N2 + 1) / 12)
- N1: number of male shoppers (14)
- N2: number of female shoppers (16)

Using the given values, we have:
test statistic = [(14) * (81) - (16) * (49)] / sqrt(14 * 16 * (14 + 16 + 1) / 12)

Step 4: Determine the critical region and the critical value:
- We need to consult the appropriate reference table for the critical value for the chosen significance level (e.g., alpha = 0.05 for a 5% significance level).

Step 5: Make a decision:
- If the calculated test statistic falls within the critical region (i.e., it is greater than the critical value), we reject the null hypothesis. This means there is a significant difference between the buying habits of male and female shoppers.
- If the calculated test statistic does not fall within the critical region (i.e., it is smaller than the critical value), we fail to reject the null hypothesis. This means there is no significant difference between the buying habits of male and female shoppers.

By following these steps and consulting the appropriate reference table, you can determine whether there is any reason to suppose that the two populations (male and female shoppers) have different buying habits.