Determinants of Demand and Supply —
อุปสงค์ (Demand) คืออะไร

อุปสงค์ (Demand) คือปริมาณสินค้าหรือบริการที่ผู้บริโภคต้องการซื้อ ณ ระดับราคาต่างๆ ในช่วงเวลาหนึ่ง โดยมีเงื่อนไขว่าผู้บริโภคมีความสามารถในการซื้อ (Ability to Pay) และมีความเต็มใจที่จะซื้อ (Willingness to Buy)
เนื้อหาเกี่ยวข้อง — ทำความเข้าใจ supply-side vs demand-side policies
Law of Demand ระบุว่า เมื่อปัจจัยอื่นคงที่ (Ceteris Paribus) ถ้าราคาสินค้าสูงขึ้น ปริมาณความต้องการซื้อจะลดลง และถ้าราคาสินค้าลดลง ปริมาณความต้องการซื้อจะเพิ่มขึ้น เป็นความสัมพันธ์แบบผกผัน (Inverse Relationship)
เนื้อหาเกี่ยวข้อง — ดูเพิ่มเติมเรื่อง Python Rich Cost Optimization ลดค่าใช้จ่าย
ปัจจัยกำหนดอุปสงค์ (Determinants of Demand)
| ปัจจัย | ผลกระทบ | ตัวอย่าง |
|---|---|---|
| ราคาสินค้า (Price) | ราคาสูง → Demand ลด (Movement along curve) | น้ำมันแพงขึ้น คนขับรถน้อยลง |
| รายได้ (Income) | รายได้เพิ่ม → Demand สินค้าปกติเพิ่ม | เงินเดือนขึ้น ซื้อของดีขึ้น |
| สินค้าทดแทน (Substitutes) | ราคา Substitute สูงขึ้น → Demand เพิ่ม | Pepsi แพงขึ้น คนซื้อ Coke มากขึ้น |
| สินค้าเกื้อกูล (Complements) | ราคา Complement สูงขึ้น → Demand ลด | เครื่องพิมพ์แพง คนซื้อหมึกน้อยลง |
| รสนิยม (Tastes) | เทรนด์เปลี่ยน → Demand เปลี่ยน | เทรนด์สุขภาพ Demand อาหารออร์แกนิกเพิ่ม |
| จำนวนผู้ซื้อ (Population) | ประชากรเพิ่ม → Demand เพิ่ม | เมืองขยาย Demand ที่อยู่อาศัยเพิ่ม |
| ความคาดหวัง (Expectations) | คาดว่าราคาจะขึ้น → ซื้อตอนนี้มากขึ้น | ข่าวน้ำมันจะขึ้นราคา คนแห่เติมน้ำมัน |
ปัจจัยกำหนดอุปทาน (Determinants of Supply)
| ปัจจัย | ผลกระทบ | ตัวอย่าง |
|---|---|---|
| ราคาสินค้า (Price) | ราคาสูง → Supply เพิ่ม (Movement along curve) | ข้าวแพง ชาวนาปลูกข้าวมากขึ้น |
| ต้นทุน (Input Costs) | ต้นทุนสูง → Supply ลด | ค่าแรงขึ้น ต้นทุนผลิตสูง ผลิตน้อยลง |
| เทคโนโลยี (Technology) | เทคโนโลยีดีขึ้น → Supply เพิ่ม | เครื่องจักรใหม่ผลิตได้เร็วขึ้น ต้นทุนลด |
| นโยบายรัฐ (Government) | ภาษีสูง → Supply ลด, Subsidy → Supply เพิ่ม | ภาษีนำเข้าสูง สินค้าน้อยลง |
| จำนวนผู้ขาย (Sellers) | ผู้ขายมากขึ้น → Supply เพิ่ม | ร้านกาแฟเปิดใหม่มาก Supply เพิ่ม |
| ความคาดหวัง (Expectations) | คาดว่าราคาจะขึ้น → กักตุนสินค้า Supply ลด | ผู้ผลิตชะลอขาย รอราคาดีกว่า |
Python Script คำนวณ Demand, Supply และ Equilibrium

# Python Script วิเคราะห์ Demand, Supply และ Equilibrium
import numpy as np
class DemandSupplyModel:
"""โมเดลวิเคราะห์อุปสงค์ อุปทาน และจุดดุลยภาพ"""
def __init__(self, demand_intercept, demand_slope,
supply_intercept, supply_slope):
"""
Demand: Qd = demand_intercept + demand_slope * P
Supply: Qs = supply_intercept + supply_slope * P
demand_slope ต้องเป็นลบ (Law of Demand)
supply_slope ต้องเป็นบวก (Law of Supply)
"""
self.d_int = demand_intercept # a
self.d_slope = demand_slope # b (ลบ)
self.s_int = supply_intercept # c
self.s_slope = supply_slope # d (บวก)
def demand(self, price):
"""คำนวณ Quantity Demanded ที่ราคาที่กำหนด"""
return max(0, self.d_int + self.d_slope * price)
def supply(self, price):
"""คำนวณ Quantity Supplied ที่ราคาที่กำหนด"""
return max(0, self.s_int + self.s_slope * price)
def equilibrium(self):
"""คำนวณราคาและปริมาณดุลยภาพ"""
# Qd = Qs
# a + bP = c + dP
# P* = (a - c) / (d - b)
if (self.s_slope - self.d_slope) == 0:
return None, None
price_eq = (self.d_int - self.s_int) / (self.s_slope - self.d_slope)
qty_eq = self.demand(price_eq)
return round(price_eq, 2), round(qty_eq, 2)
def surplus_shortage(self, price):
"""คำนวณ Surplus หรือ Shortage ที่ราคาที่กำหนด"""
qd = self.demand(price)
qs = self.supply(price)
diff = qs - qd
if diff > 0:
return f"Surplus: {diff:.0f} units (Supply > Demand)"
elif diff < 0:
return f"Shortage: {abs(diff):.0f} units (Demand > Supply)"
else:
return "Equilibrium: Supply = Demand"
def shift_demand(self, shift_amount):
"""Shift เส้น Demand (เช่น รายได้เพิ่ม)"""
new_model = DemandSupplyModel(
self.d_int + shift_amount, self.d_slope,
self.s_int, self.s_slope
)
return new_model
def shift_supply(self, shift_amount):
"""Shift เส้น Supply (เช่น เทคโนโลยีดีขึ้น)"""
new_model = DemandSupplyModel(
self.d_int, self.d_slope,
self.s_int + shift_amount, self.s_slope
)
return new_model
def price_elasticity_demand(self, p1, p2):
"""คำนวณ Price Elasticity of Demand"""
q1, q2 = self.demand(p1), self.demand(p2)
if q1 == 0 or p1 == p2:
return 0
pct_q = (q2 - q1) / q1 * 100
pct_p = (p2 - p1) / p1 * 100
return round(pct_q / pct_p, 2) if pct_p != 0 else 0
def summary(self):
"""สรุปผล"""
p_eq, q_eq = self.equilibrium()
print("=== Demand-Supply Analysis ===")
print(f"Demand: Qd = {self.d_int} + ({self.d_slope})P")
print(f"Supply: Qs = {self.s_int} + ({self.s_slope})P")
print(f"Equilibrium Price: {p_eq}")
print(f"Equilibrium Quantity: {q_eq}")
print(f"\nAt different prices:")
for p in [p_eq - 20, p_eq - 10, p_eq, p_eq + 10, p_eq + 20]:
if p > 0:
print(f" P={p:.0f}: Qd={self.demand(p):.0f}, "
f"Qs={self.supply(p):.0f} → {self.surplus_shortage(p)}")
# ตัวอย่าง: ตลาดกาแฟ
# Qd = 1000 - 5P (Demand)
# Qs = -200 + 3P (Supply)
market = DemandSupplyModel(1000, -5, -200, 3)
market.summary()
# Shift Demand (รายได้ผู้บริโภคเพิ่ม +200)
print("\n--- After Income Increase (Demand Shift +200) ---")
new_market = market.shift_demand(200)
new_market.summary()
# Elasticity
ped = market.price_elasticity_demand(100, 120)
print(f"\nPrice Elasticity of Demand (P:100→120): {ped}")
Demand Shifters — สิ่งที่ทำให้เส้น Demand เลื่อน
# สรุปปัจจัยที่ทำให้เส้น Demand Shift
Demand Shift ขวา (เพิ่มขึ้น):
+ รายได้ผู้บริโภคเพิ่ม (สินค้าปกติ)
+ ราคาสินค้าทดแทนสูงขึ้น
+ ราคาสินค้าเกื้อกูลลดลง
+ รสนิยมเปลี่ยนไปชอบสินค้ามากขึ้น
+ จำนวนผู้บริโภคเพิ่มขึ้น
+ คาดว่าราคาจะสูงขึ้นในอนาคต
Demand Shift ซ้าย (ลดลง):
- รายได้ผู้บริโภคลดลง (สินค้าปกติ)
- ราคาสินค้าทดแทนลดลง
- ราคาสินค้าเกื้อกูลสูงขึ้น
- รสนิยมเปลี่ยนไปไม่ชอบสินค้า
- จำนวนผู้บริโภคลดลง
- คาดว่าราคาจะลดลงในอนาคต
Supply Shift ขวา (เพิ่มขึ้น):
+ ต้นทุนปัจจัยการผลิตลดลง
+ เทคโนโลยีดีขึ้น
+ จำนวนผู้ผลิตเพิ่มขึ้น
+ รัฐบาลให้ Subsidy
+ สภาพอากาศดี (สินค้าเกษตร)
Supply Shift ซ้าย (ลดลง):
- ต้นทุนปัจจัยการผลิตสูงขึ้น
- ภัยธรรมชาติ
- จำนวนผู้ผลิตลดลง
- รัฐบาลเก็บภาษี/กฎระเบียบเพิ่ม
- สภาพอากาศไม่ดี
ตัวอย่างเหตุการณ์จริง:
COVID-19 → Demand มาสก์ Shift ขวา + Supply ลด = ราคาพุ่ง
EV Technology → Supply รถ EV เพิ่ม + Demand เพิ่ม = ปริมาณเพิ่มมาก
ค่าแรงขั้นต่ำขึ้น → Supply Shift ซ้าย = ราคาสินค้าสูงขึ้น
Elasticity — ความยืดหยุ่นของอุปสงค์และอุปทาน
# คำนวณ Elasticity ต่างๆ
def price_elasticity(q1, q2, p1, p2):
"""Price Elasticity of Demand (PED)"""
pct_q = (q2 - q1) / ((q1 + q2) / 2) * 100 # Midpoint Method
pct_p = (p2 - p1) / ((p1 + p2) / 2) * 100
ped = pct_q / pct_p if pct_p != 0 else 0
if abs(ped) > 1:
elasticity = "Elastic (ยืดหยุ่นมาก)"
elif abs(ped) == 1:
elasticity = "Unit Elastic"
else:
elasticity = "Inelastic (ยืดหยุ่นน้อย)"
return {"PED": round(ped, 3), "type": elasticity}
def income_elasticity(q1, q2, y1, y2):
"""Income Elasticity of Demand (YED)"""
pct_q = (q2 - q1) / ((q1 + q2) / 2) * 100
pct_y = (y2 - y1) / ((y1 + y2) / 2) * 100
yed = pct_q / pct_y if pct_y != 0 else 0
if yed > 1:
good_type = "Luxury Good (สินค้าฟุ่มเฟือย)"
elif yed > 0:
good_type = "Normal Good (สินค้าปกติ)"
else:
good_type = "Inferior Good (สินค้าด้อยคุณภาพ)"
return {"YED": round(yed, 3), "type": good_type}
def cross_elasticity(qa1, qa2, pb1, pb2):
"""Cross-Price Elasticity (XED)"""
pct_qa = (qa2 - qa1) / ((qa1 + qa2) / 2) * 100
pct_pb = (pb2 - pb1) / ((pb1 + pb2) / 2) * 100
xed = pct_qa / pct_pb if pct_pb != 0 else 0
if xed > 0:
relation = "Substitutes (สินค้าทดแทน)"
elif xed < 0:
relation = "Complements (สินค้าเกื้อกูล)"
else:
relation = "Unrelated (ไม่เกี่ยวข้อง)"
return {"XED": round(xed, 3), "type": relation}
# ตัวอย่าง
print("=== Elasticity Analysis ===")
ped = price_elasticity(100, 80, 50, 60)
print(f"PED: {ped['PED']} → {ped['type']}")
yed = income_elasticity(100, 130, 30000, 35000)
print(f"YED: {yed['YED']} → {yed['type']}")
xed = cross_elasticity(100, 120, 50, 60)
print(f"XED: {xed['XED']} → {xed['type']}")
Determinants of Demand คืออะไร
ปัจจัยกำหนดอุปสงค์ ได้แก่ ราคาสินค้า รายได้ผู้บริโภค ราคาสินค้าทดแทน ราคาสินค้าเกื้อกูล รสนิยมผู้บริโภค จำนวนผู้บริโภค และความคาดหวังในอนาคต การเปลี่ยนแปลงปัจจัยเหล่านี้ทำให้เส้น Demand Shift
แนะนำเพิ่มเติม — อ่านเพิ่มเติมที่ SiamCafeBook
เนื้อหาเกี่ยวข้อง — แนะนำให้อ่าน GCP Vertex AI Real-time Processing





