Thep Excel

GAMMA – คำนวณค่า Gamma Function

ส่งกลับค่า Gamma function Γ(x) ซึ่งเป็นฟังก์ชันคณิตศาสตร์ที่ขยายแนวคิดของแฟกทอเรียลไปยังจำนวนจริงและจำนวนเชิงซ้อน

=GAMMA(number)

By ThepExcel AI Agent
2 December 2025

Function Metrics


Popularity
5/10

Difficulty
4/10

Usefulness
6/10

Syntax & Arguments

=GAMMA(number)

Argument Type Required Default Description
number Number Yes ค่าตัวเลขที่ต้องการคำนวณค่า Gamma function สำหรับจำนวนบวก (number > 0)

Examples

คำนวณ Gamma สำหรับจำนวนเต็มบวก
GAMMA(5)
สำหรับจำนวนเต็มบวก n, GAMMA(n) = (n-1)! ดังนั้น GAMMA(5) = 4! = 4×3×2×1 = 24
Excel Formula:

=GAMMA(5)

Result:

24

Gamma สำหรับค่า 0.5
GAMMA(0.5)
GAMMA(0.5) = √π (รากที่สองของ pi) ≈ 1.7724538509 ซึ่งเป็นค่าพิเศษในคณิตศาสตร์
Excel Formula:

=GAMMA(0.5)

Result:

1.77245385...

ใช้กับ Gamma Distribution
GAMMA(2) * GAMMA(3) / GAMMA(5)
ใช้ในการคำนวณค่าสัมประสิทธิ์ของ Beta Distribution: B(a,b) = GAMMA(a)*GAMMA(b)/GAMMA(a+b)
Excel Formula:

=GAMMA(2) * GAMMA(3) / GAMMA(5)

Result:

0.01666...

Gamma สำหรับจำนวนทศนิยม
GAMMA(2.5)
GAMMA(2.5) = 1.5 × GAMMA(1.5) = 1.5 × (√π/2) ≈ 1.3293403882
Excel Formula:

=GAMMA(2.5)

Result:

1.32934...

FAQs

ต่างกันยังไง GAMMA กับ FACT?

FACT(n) = n! แต่ GAMMA(n) = (n-1)! ดังนั้น GAMMA(5) = 24 ขณะที่ FACT(5) = 120 หรือ GAMMA(n) = FACT(n-1) นอกจากนี้ GAMMA รองรับจำนวนทศนิยม แต่ FACT ไม่ได้

input ต้องเป็นจำนวนบวกไหม?

ใช่ GAMMA ต้องการ number > 0 ถ้ากำหนด 0 หรือจำนวนลบ จะได้ #NUM! error

ใช้ได้กับ Excel เวอร์ชันไหนบ้าง?

GAMMA มีตั้งแต่ Excel 2010 เป็นต้นมา ใน Excel 365 ใช้ได้เต็มที่

เวลาใช้งาน GAMMA ต้องเตรียมอะไรบ้าง?

อินพุต (number) ต้องเป็นจำนวนบวก > 0 เท่านั้น ถ้าเป็น 0 หรือลบ ให้ใช้ IFERROR เพื่อจัดการ error

Resources & Related

Additional Notes

GAMMA เป็นฟังก์ชันคณิตศาสตร์ที่ใช้ในการวิเคราะห์ทางสถิติและความน่าจะเป็น โดยส่งกลับค่า Gamma function สำหรับจำนวนที่ให้มา

จุดเด่น:
– สำหรับจำนวนเต็มบวก n: GAMMA(n) = (n-1)! (แฟกทอเรียล)
– ประโยชน์ในการคำนวณ distribution statistics เช่น Gamma Distribution, Beta Distribution
– ใช้กับจำนวนทศนิยมและจำนวนเชิงซ้อนได้

ส่วนตัวผม ฟังก์ชันนี้อาจดูแปลก แต่มันมีประโยชน์จริงในสถิติชั้นสูงและการวิเคราะห์ข้อมูล เช่น การสร้าง confidence intervals หรือการทำ hypothesis testing กับ gamma distribution

Leave a Reply

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