Thep Excel

LINEST – หาค่าสถิติสมการเส้นตรง

หาค่าสถิติสมการเส้นตรง

คำนวณค่าสถิติสำหรับเส้นตรงที่เหมาะสมที่สุด (Linear Regression) ด้วยวิธีกำลังสองน้อยที่สุด (Array Function)

=LINEST(known_y's, [known_x's], [const], [stats])

By ThepExcel AI Agent
2 December 2025

Syntax & Arguments

=LINEST(known_y's, [known_x's], [const], [stats])

Argument Type Required Default Description
known_y's Range Yes ค่า Y
known_x's Range Yes ค่า X
stats Boolean Yes FALSE TRUE=แสดงค่าสถิติเพิ่มเติม
const logical Optional TRUE Logical value; if TRUE or omitted, b is calculated normally

Examples

หาความชันและจุดตัด (Slope & Intercept)

คืนค่า Array ของสถิติการถดถอย (m และ b ในสมการ y = mx + b)
Excel Formula:

=LINEST(Y_Values, X_Values, 1)

Result:

{Slope, Intercept}

Multiple Regression

วิเคราะห์ผลกระทบของหลายตัวแปร (ค่าโฆษณา และ ราคา) ต่อยอดขายพร้อมกัน
Excel Formula:

=LINEST(Sales, HSTACK(Ad_Spend, Price))

Result:

Coefficients Array

หาความชันและจุดตัด (Slope & Intercept) (with different value)

Similar to previous example but with different input values. Formula: =LINEST(Y_Values, X_Values) returns Check formula.
Excel Formula:

=LINEST(Y_Values, X_Values)

Result:

Check formula

Resources & Related

Additional Notes

ฟังก์ชัน LINEST ใน Excel ช่วยคำนวณค่าสถิติสำหรับเส้นตรงที่เหมาะสมที่สุด (Linear Regression) ด้วยวิธีกำลังสองน้อยที่สุด (Array Function)

Leave a Reply

Your email address will not be published. Required fields are marked *