Sai lệch chọn mẫu (selection bias) xảy ra khi dữ liệu được giữ lại hoặc loại bỏ theo một cách khiến mẫu không còn đại diện cho tổng thể. Khi nghiên cứu mối liên hệ giữa độ ẩm hạt xanh và phản ứng nhiệt trong rang, loại sai lệch này có thể âm thầm len vào quá trình thu thập dữ liệu và làm méo kết luận cuối cùng.
Sai lệch chọn mẫu có thể bắt đầu trước khi rang
Rủi ro có thể xuất hiện ngay từ bước chọn lô nguyên liệu để đưa vào thử nghiệm. Nếu người thực hiện có xu hướng chọn những lô có độ ẩm dễ đo, dễ xử lý, hoặc từng cho ra mẻ rang “đẹp” trong quá khứ, tập dữ liệu thu được sẽ không còn phản ánh đầy đủ dải biến động độ ẩm thực tế của nguyên liệu.

Độ ẩm cần một mẫu đại diện
Để mối liên hệ giữa độ ẩm và phản ứng nhiệt có ý nghĩa thống kê, mẫu nghiên cứu cần bao phủ đủ rộng dải độ ẩm mà nguyên liệu thực tế có thể có, bao gồm cả những lô ở hai đầu của dải phân bố. Nếu chỉ tập trung vào các lô có độ ẩm nằm quanh giá trị trung bình, kết luận rút ra sẽ khó áp dụng cho những lô nguyên liệu nằm ngoài phạm vi đã khảo sát.
Thiết kế lấy mẫu trước khi xem kết quả
Một cách giảm sai lệch hiệu quả là quy định trước quy tắc chọn mẫu — ví dụ chọn ngẫu nhiên trong từng dải độ ẩm, hoặc chọn theo lịch cố định bất kể kết quả rang trước đó ra sao — rồi mới bắt đầu thu thập dữ liệu. Nếu quy tắc chọn mẫu được điều chỉnh sau khi đã nhìn thấy một phần kết quả, nguy cơ vô tình thiên vị về phía giả thuyết ban đầu sẽ tăng lên.
Đặt độ ẩm cạnh các biến đầu vào khác
Độ ẩm không phải biến duy nhất ảnh hưởng đến phản ứng nhiệt của hạt. Kích thước hạt, mật độ, và nguồn gốc lô hàng cũng có thể tác động đồng thời. Nếu không ghi nhận các biến này cùng lúc, một mối liên hệ quan sát được giữa độ ẩm và đường nhiệt có thể thực ra bị chi phối bởi một biến khác đi kèm với độ ẩm trong chính tập mẫu đã chọn.
Liên hệ độ ẩm với đường nhiệt như thế nào
Nghiên cứu về động học truyền nhiệt và truyền khối trong rang cho thấy độ ẩm ban đầu có thể ảnh hưởng đến tốc độ hạt hấp thụ nhiệt trong giai đoạn đầu của mẻ rang. Tuy nhiên, mức độ ảnh hưởng cụ thể được ghi nhận trong một nghiên cứu chỉ phản ánh đúng phạm vi nguyên liệu và hệ thống rang mà nghiên cứu đó sử dụng.
Nguy cơ ngoại suy từ mẫu nhỏ
Khi số lượng mẻ thử nghiệm ít, một vài quan sát bất thường có thể tạo ấn tượng về một xu hướng rõ ràng dù thực chất chỉ là biến động ngẫu nhiên. Việc ngoại suy một kết luận từ mẫu nhỏ sang toàn bộ dải nguyên liệu sử dụng hằng ngày cần được thực hiện thận trọng, đặc biệt khi mẫu nhỏ đó lại được chọn theo cách không ngẫu nhiên.
Cách giảm selection bias trong dữ liệu rang
Một số cách thực hành có thể giúp giảm rủi ro này: ghi lại toàn bộ các mẻ rang trong một giai đoạn thay vì chỉ chọn lọc những mẻ “đáng chú ý”; xác định trước tiêu chí đưa một mẻ vào hay loại khỏi phân tích; và lưu cả những mẻ có kết quả không phù hợp với giả thuyết ban đầu thay vì bỏ qua chúng.
Kết luận thực hành
Muốn kiểm chứng mối liên hệ giữa độ ẩm hạt xanh và phản ứng nhiệt một cách đáng tin cậy, việc chọn mẫu cần được thiết kế trước khi thu thập dữ liệu, bao phủ đủ rộng dải độ ẩm thực tế, và đi kèm các biến đầu vào khác có thể gây nhiễu. Một kết luận rút ra từ một tập mẫu bị chọn lọc thiên lệch không nên được xem là quy luật chung cho mọi lô nguyên liệu.
Tài liệu tham khảo
- Hernández, J.A. et al. (2007). Analysis of the heat and mass transfer during coffee batch roasting. Journal of Food Engineering, 78, 1141–1148.
- Heat and Mass Transfer Kinetics on the Chemical and Sensory Quality of Arabica Coffee Beans (2022). Agronomy, 12, 2880.
- Batch-Scale Simulation of Heat and Mass Transfer of Coffee Roasting in Spouted Bed Roasters (2025). Beverages, 11, 162.
Selection bias occurs when data is kept or discarded in a way that makes the sample no longer representative of the whole population. When studying the relationship between green-bean moisture and thermal response during roasting, this type of bias can quietly creep into data collection and distort the final conclusion.
Selection bias can start before roasting even begins
Risk can appear right at the step of choosing which raw-material lots to include in a test. If the person conducting the test tends to pick lots with moisture that's easy to measure, easy to handle, or that previously produced a “nice-looking” batch, the resulting dataset will no longer fully reflect the actual range of moisture variation in the raw material.

Moisture needs a representative sample
For the relationship between moisture and thermal response to be statistically meaningful, the study sample needs to cover a wide enough range of the moisture levels the raw material can actually have, including lots at both ends of the distribution. If only lots near the average moisture value are included, the conclusions drawn will be hard to apply to lots that fall outside the range studied.
Designing the sampling method before looking at results
An effective way to reduce bias is defining the sampling rule in advance — for example, choosing randomly within each moisture band, or selecting on a fixed schedule regardless of previous roasting outcomes — before starting to collect data. If the sampling rule gets adjusted after some results have already been seen, the risk of unintentionally favoring the initial hypothesis increases.
Placing moisture alongside other input variables
Moisture isn't the only variable affecting a bean's thermal response. Bean size, density, and lot origin can all act at the same time. If these variables aren't recorded simultaneously, an observed relationship between moisture and the heat curve could actually be driven by another variable that happens to travel alongside moisture in the chosen sample.
How moisture relates to the heat curve
Research on heat and mass transfer kinetics in roasting shows initial moisture can affect how quickly a bean absorbs heat in the early stage of a roast. However, the specific magnitude of effect recorded in a given study only reflects the exact raw material and roasting system that study used.
The risk of extrapolating from a small sample
When the number of test batches is small, a few unusual observations can create the impression of a clear trend when it's really just random variation. Extrapolating a conclusion from a small sample to the entire range of raw material used daily needs to be done cautiously, especially when that small sample was chosen in a non-random way.
Ways to reduce selection bias in roasting data
Some practices can help reduce this risk: logging every roasted batch within a period instead of only selecting “notable” ones; defining in advance the criteria for including or excluding a batch from analysis; and keeping batches whose results don't fit the initial hypothesis rather than discarding them.
Practical conclusion
To reliably verify the relationship between green-bean moisture and thermal response, sample selection needs to be designed before data collection, cover a wide enough range of actual moisture, and account for other input variables that could create confounding. A conclusion drawn from a biased, selectively chosen sample shouldn't be treated as a general rule for every batch of raw material.
References
- Hernández, J.A. et al. (2007). Analysis of the heat and mass transfer during coffee batch roasting. Journal of Food Engineering, 78, 1141–1148.
- Heat and Mass Transfer Kinetics on the Chemical and Sensory Quality of Arabica Coffee Beans (2022). Agronomy, 12, 2880.
- Batch-Scale Simulation of Heat and Mass Transfer of Coffee Roasting in Spouted Bed Roasters (2025). Beverages, 11, 162.
