What should we do when we have more than two groups and we want to determine if there is a significant difference between the means of these groups?
Chúng ta nên làm gì khi có nhiều hơn hai nhóm và chúng ta muốn xác định rằng có sự chênh lệch lớn giữa trung bình của các nhóm hay không?
The answer to this question is: ANOVA
Câu trả lời cho câu hỏi này chính là sử dụng ANOVA.
Let’s suppose that we are interested in comparing prices between three major supermarket chains in St. Louis: (1) Dierberg’s, (2) Schnuck’s, and (3) Shop ‘n Save. Suppose, further, that we have selected the 28 specific items listed in the table below as our “market basket of products” to compare prices at these three supermarkets. We have also specified the package size of each of these items in our checklist.
Hãy bắt đầu với việc giả sử rằng chúng ta muốn so sánh giá giữa ba chuỗi siêu thị lớn ở St. Loius: (1) Dierberg’s, (2) Schnuck’s, và (3) Shop ‘n Save. Cũng giả sử rằng chúng ta đã chọn được 28 mặt hàng được liệt kê trong bảng dưới để so sánh giá của ba siêu thị và danh sách các sản phẩm này được xem như là “giỏ hàng thị trường” của chúng ta. Chúng ta cũng xác định cụ thể kích thước đóng gói của các mục trong danh sách.

We are now ready to perform an ANOVA test on these data using the following steps:
Bây chúng ta đã sẵn sàng để thực hiện kiểm định ANOVA trên dữ liệu thu thập được theo các bước sau:
Tab Data → Data Analysis → ANOVA: Single Factor:
• Input Range: $B$1:$D$29 (excluding ‘Item’ column)
• Grouped By: Columns
• Labels in first row
• Alpha: 0.05
• Output Range: $G$1 (we can change the place to be put the result by wer own)
ANOVA allows us to test for the differences between means when we have three or more groups of data. This ANOVA test is called the F-test statisitc, and is typically identified with the letter F.
ANOVA cho phép chúng ta kiểm định sự khác nhau giữa các giá trị trung bình khi mà dữ liệu có ba hoặc nhiều nhóm. Kiểm định này được gọi là thống kê kiểm định F, và thường được nhận diện bằng ký tự F.
The formula for the F-test is this:
Công thức của F sẽ là:
F = Mean Square between groups (MSb) divided by Mean Square within groups (MSw) = MSb/MSw

As we can see in the result table, the MS of between groups is 4.1695, and that of within groups is 1.2251 which results in F-test of 3.4036.
Có thể thấy từ bảng kết quả, MS của ‘between groups’ là 4.1695, con số này của ‘within groups’ là 1.2251, do đó F = 3.4036.
In order to determine whether this figure for F of 3.4036 indicates a significant difference between the means of the three groups, the first step is to write the null hypothesis and the research hypothesis for the three groups of prices.
Để xác định con số 3.4036 có cho thấy tồn tại sự chênh lệch giữa các giá trị trung bình của ba nhóm hay không, thì bước đầu tiên chúng ta phải viết giả thiết H0 và giả thiết nghiên cứu của ba nhóm giá cả.
In our supermarket price comparisons, the null hypothesis states that the population means of the three groups are equal, while the research hypothesis states that the population means of the three groups are not equal and that there is, therefore, a significant difference between the population means of the three groups. Which of these two hypotheses should we accept based on the ANOVA results?
Trong so sánh giá siêu thị của chúng ta, giả thiết H0 cho rằng trung bình tổng thể của ba nhóm là bằng nhau, trong khi giả thiết nghiên cứu lại rằng trung bình tổng thế của ba nhóm là không bằng nhau, do đó, tồn tại sự chênh lệch giữa giá trị trung bình tổng thể của ba nhóm. Liệu giả thiết nào nên được chấp nhận dựa vào bảng kết quả ANOVA?
To state the hypotheses, let’s call Dierberg’s as Group 1, Schnuck’s as Group 2, and Shop ‘n Save as Group 3. The hypotheses would then be:
Để xây dựng các giả thiết, hãy gọi Dierberg’s là Nhóm 1, Schnuck’s là Nhóm 2, and Shop ‘n Save là Nhóm 3. Khi đó, các giả thiết sẽ là:
H0: μ1 = μ2 = μ3
H1: μ1 ≠ μ2 ≠ μ3
The decision rule for the ANOVA F-test is the following: If the value for F is less than the critical F-value, accept the null hypothesis. Or If the value of F is greater than the critical F-value, reject the null hypothesis. Note that it is not necessary to take the absolute value of F of 3.4036. The F-value can never be less than one, and so it can never be a negative value which requires us to take its absolute value in order to treat it as a positive value.
Quy luật để đưa ra quyết định cho kiểm định F ANOVA là: nếu như giá trị F bé hơn giá trị tới hạn (F crit) thì chấp nhận giả thiết H0, và ngược lại, bác bỏ giả thiết H0. Cũng lưu ý rằng không cần thiết phải lấy giá trị tuyệt đối của F vì F không bao giờ âm.
Since the value of F of 3.4036 is greater than the F crit of 3.1093, we reject the null hypothesis or there is a significant difference between the population means of the three supermarkets’ prices.
Bởi vì F = 3.4036 lớn hơn F crit 3.1093, chúng ra bác bỏ giả thiết H0 hay có sự khác biệt lớn giữa các giá trị trung bình tổng thể của ba nhóm giá từ ba siêu thị.
It is important to note that ANOVA tells us that there was a significant difference between the population means of the three groups, but it does not tell us which pairs of groups were significantly different from each other.
Điều quan trọng là ANOVA chỉ cho chúng ta biết rằng có sự chênh lệch giữa các giá trị trung bình tổng thể của ba nhóm giá từ ba siêu thị sứ không nói rằng có cặp nào giữa chúng khác nhau không.
To answer that question, we need to do a different test called the ANOVA t-test.
Để trả lời câu hỏi này, chúng ta cần thực hiện một kiểm định khác có tên gọi là phép thử ANOVA t.
Since we have three groups of data (one group for each of the three supermarkets), we would have to perform three separate ANOVA t-tests to determine which pairs of groups were significantly different:
Bởi vì chúng ta có ba nhóm dữ liệu, nên chúng ta sẽ thực hiện ba lần phép thử ANOVA t để xác định nhóm giá nào thực sự khác nhau:
(1) Dierberg’s vs. Schnuck’s
(2) Dierberg’s vs. Shop ‘n Save
(3) Schnuck’s vs. Shop ‘n Save
We will do just one of these pairs of tests, Dierberg’s vs. Shop ‘n Save. The ANOVA t-test for the other two pairs of groups would be done in the same way.
Chúng ta sẽ thực hiện kiểm định một trong ba nhóm, Dierberg’s với Shop ‘n Save. Phép thử ANOVA t cho hai nhóm còn lại cũng được thực hiện theo cách tương tự.
Let’s state the hypotheses first. The null one states that the popultation means of the two groups are equal, and the research hypothesis reverses the statement.
Trước tiên hãy đưa ra giả thiết. Giả thiết không cho rằng giá trị trung bình tổng thể của hai nhóm là bằng nhau, giả thiết nghiên cứu thì cho rằng chúng khác nhau.
For Dierberg’s vs. Shop ‘n Save, the formula for the ANOVA t-test is:
Với hai nhóm Dierberg’s và Shop ‘n Save, công thức cho phép thử ANOVA t sẽ là:

Now, what do we do with this ANOVA t-test result of 2.54? In order to interpret this value of 2.54 correctly, we need to determine the critical value of t for the ANOVA t-test. To do that, we need to find the degrees of freedom for the ANOVA t-test by taking the total sample size of all of the groups and subtract the number of groups:
Bây giờ, chúng ta sẽ làm gì với kết quả của phép thử ANOVA t = 2.54? Để diễn giải giá trị mày một cách chính xác, chúng ta cần xác định giá trị tới hạn t của phép thử ANOVA t này. Để làm được điều này, phải tìm được bậc tự do của phép thử ANOVA t bằng cách lấy tổng kích thước mẫu của các nhóm trừ đi số lượng nhóm:
df = 84 – 3 = 81
If we look up df = 80 (instead of 81 because we should move the real df backward to the closest df to increase the critical value which can help reinforce the conclusion and avoid the Type I error) in the t-table in the degrees of freedom column (df), which is the second column on the left of this table, we will find that the critical t-value is 1.96.
Nếu chúng ta tra cứu df = 80 (thay vì 81 vì chúng ta nên dịch chuyển bậc tự do thậtlufi về bậc tự do gần nhất để tăng giá trị tới hạn làm tăng sức mạnh của kết luận và tránh được sai lầm loại I) trong cột bậc tự do trong bảng t, sẽ thấy được giá trị tới hạn t là 1.99.

Since the absolute value of 2.50 is greater than the critical t-value of 1.99, we reject the null hypothesis (that the population means of the two groups are equal). Or the average prices of our market basket of items at Dierberg’s were significantly higher than the average prices at Shop ‘n Save ($2.44 vs. $1.69).
Vì giá trị tuyệt đối của 2.54 lớn hơn giá trị tới hạn t là 1.99, nên chúng ta bác bỏ giả thiết H0 cho rằng trung bình tổng thể của hai nhóm là giống nhau. Hoặc có thể nói, mức giá trung bình của giỏ hàng ở siêu thị Dierberg’s khác với (lớn hơn nhiều) so với giá trung bình của giỏ hàng ở siêu thị Shop ‘n Save ($2.44 với $1.69).
* this table is created in Excel by using the T.INV.2T formula.
bảng này được tạo trong Excel bằng cách sử dụng công thức T.INV.2T.
This post refers the content from the book “Excel 2019 for Business Statistics: A Guide to Solving Practical Problems” of Thomas J. Quirk.
Bài viết này tham khảo nội dung từ cuốn sách “Excel 2019 trong Thống kê Kinh doanh: Hướng dẫn giải quyết các vấn đề thực tiễn” của Thomas J. Quick.