# Đọc dữ liệu
bw <- read.csv("/Users/vothainguyetcam/Downloads/birthwt.csv")
# Vẽ biểu đồ phân tán với đường hồi quy tuyến tính
plot(bw$lwt, bw$bwt,
main = "Relationship between lwt (mother's weight) and bwt (birth weight)",
xlab = "Mother's weight (lwt)",
ylab = "Birth weight (bwt)",
pch = 19, col = "blue")
# Thêm đường hồi quy tuyến tính
abline(lm(bwt ~ lwt, data = bw), col = "red", lwd = 2)