Demand and Supply
Demand Supply อุปสงค์ อุปทาน Equilibrium ดุลยภาพ Elasticity Pricing Surplus Shortage Law Economics PDF
| Concept | Law | Curve | Shift Factors |
|---|---|---|---|
| Demand (อุปสงค์) | ราคาขึ้น ซื้อลด | ลาดลง (Downward) | Income Taste Substitutes Population |
| Supply (อุปทาน) | ราคาขึ้น ขายเพิ่ม | ลาดขึ้น (Upward) | Cost Technology Sellers Policy |
| Equilibrium | D = S | จุดตัด D&S | Shift D หรือ S → ดุลยภาพใหม่ |
| Surplus | P > Eq Price | S > D | ราคาลดลงสู่ดุลยภาพ |
| Shortage | P < Eq Price | D > S | ราคาเพิ่มขึ้นสู่ดุลยภาพ |
Demand & Supply Calculator
# === Demand and Supply Analysis ===
from dataclasses import dataclass
@dataclass
class MarketPoint:
price: float
quantity_demanded: float
quantity_supplied: float
status: str
def analyze_market(demand_fn, supply_fn, prices):
results = []
for p in prices:
qd = demand_fn(p)
qs = supply_fn(p)
if abs(qd - qs) < 5:
status = "Equilibrium"
elif qs > qd:
status = f"Surplus ({qs - qd:.0f} units)"
else:
status = f"Shortage ({qd - qs:.0f} units)"
results.append(MarketPoint(p, qd, qs, status))
return results
# Linear Demand: Qd = 200 - 2P
# Linear Supply: Qs = -40 + 3P
demand = lambda p: 200 - 2 * p
supply = lambda p: -40 + 3 * p
prices = [20, 30, 40, 48, 50, 60, 70, 80]
results = analyze_market(demand, supply, prices)
print("=== Market Analysis ===")
print(f"Demand: Qd = 200 - 2P")
print(f"Supply: Qs = -40 + 3P")
print(f"Equilibrium: P=48, Q=104\n")
print(f"{'Price':>6} {'Qd':>6} {'Qs':>6} {'Status'}")
for r in results:
print(f"{r.price:>6.0f} {r.quantity_demanded:>6.0f} "
f"{r.quantity_supplied:>6.0f} {r.status}")
# Equilibrium calculation
# 200 - 2P = -40 + 3P
# 240 = 5P
# P* = 48, Q* = 200 - 2(48) = 104
eq_price = 240 / 5
eq_qty = demand(eq_price)
print(f"\nEquilibrium Price: {eq_price:.0f}")
print(f"Equilibrium Quantity: {eq_qty:.0f}")
Elasticity Calculator
# === Price Elasticity of Demand ===
@dataclass
class ElasticityResult:
good: str
price_change: str
qty_change: str
ped: float
classification: str
implication: str
def calc_ped(p1, p2, q1, q2):
pct_q = ((q2 - q1) / ((q1 + q2) / 2)) * 100
pct_p = ((p2 - p1) / ((p1 + p2) / 2)) * 100
return abs(pct_q / pct_p)
examples = [
ElasticityResult("น้ำมัน (Gasoline)",
"30 → 35 บาท/ลิตร (+16.7%)",
"100 → 95 ลิตร (-5.3%)",
calc_ped(30, 35, 100, 95),
"Inelastic (PED < 1)",
"ขึ้นราคาได้ Revenue เพิ่ม สินค้าจำเป็น"),
ElasticityResult("iPhone (Smartphone)",
"40,000 → 45,000 บาท (+12.5%)",
"1000 → 700 เครื่อง (-30%)",
calc_ped(40000, 45000, 1000, 700),
"Elastic (PED > 1)",
"ขึ้นราคา Revenue ลด มีสินค้าทดแทน"),
ElasticityResult("เกลือ (Salt)",
"10 → 15 บาท (+50%)",
"100 → 98 ถุง (-2%)",
calc_ped(10, 15, 100, 98),
"Perfectly Inelastic (~0)",
"ราคาเปลี่ยน Demand แทบไม่เปลี่ยน"),
ElasticityResult("กาแฟ Starbucks",
"150 → 170 บาท (+13.3%)",
"500 → 400 แก้ว (-20%)",
calc_ped(150, 170, 500, 400),
"Elastic (PED > 1)",
"มี Substitute เยอะ ราคาขึ้น คนเปลี่ยนร้าน"),
]
print("=== Price Elasticity Examples ===")
for e in examples:
print(f"\n [{e.good}]")
print(f" Price: {e.price_change}")
print(f" Qty: {e.qty_change}")
print(f" PED: {e.ped:.2f} → {e.classification}")
print(f" Implication: {e.implication}")
Real-world Applications
# === Pricing Strategy with D&S ===
@dataclass
class PricingApp:
application: str
ds_concept: str
example: str
tool: str
apps = [
PricingApp("Dynamic Pricing (Grab Uber)",
"Surge Pricing เมื่อ Demand > Supply ราคาขึ้น",
"ฝนตก Demand รถเพิ่ม Supply เท่าเดิม ราคาขึ้น 1.5-3x",
"Algorithm วิเคราะห์ D&S Real-time"),
PricingApp("Airline Revenue Management",
"Price Discrimination ตาม Elasticity ของแต่ละกลุ่ม",
"Business Traveler Inelastic จ่ายแพงได้ Tourist Elastic ซื้อตั๋วถูก",
"Revenue Management System Yield Optimization"),
PricingApp("Housing Market Analysis",
"Supply จำกัด (ที่ดินมีจำกัด) Demand เพิ่มตาม Population",
"กรุงเทพ Supply บ้านจำกัด Demand สูง ราคาขึ้นต่อเนื่อง",
"Real Estate Valuation Model"),
PricingApp("Commodity Trading",
"Supply Shock (สงคราม ภัยธรรมชาติ) เลื่อน Supply ซ้าย",
"สงครามรัสเซีย-ยูเครน Supply น้ำมัน/ข้าวสาลี ลด ราคาพุ่ง",
"Futures Trading Supply Analysis"),
PricingApp("Government Price Control",
"Price Floor (ค่าแรงขั้นต่ำ) Price Ceiling (ค่าเช่า)",
"ค่าแรงขั้นต่ำ 400 บาท สูงกว่า Equilibrium → Surplus (ว่างงาน)",
"Policy Analysis Welfare Economics"),
]
print("=== Real-world Applications ===")
for a in apps:
print(f"\n [{a.application}]")
print(f" D&S: {a.ds_concept}")
print(f" Example: {a.example}")
print(f" Tool: {a.tool}")
เคล็ดลับ
- Equilibrium: หาจุดตัด D=S แก้สมการ Demand = Supply
- Shift: แยกระหว่าง Movement along curve (ราคาเปลี่ยน) กับ Shift of curve (ปัจจัยอื่นเปลี่ยน)
- Elasticity: สินค้าจำเป็น Inelastic สินค้าฟุ่มเฟือย Elastic
- PDF: ดาวน์โหลด PDF จาก Khan Academy MIT OpenCourseWare ฟรี
- Practice: ฝึกวาดกราฟ D&S วิเคราะห์ Shift ทุกวัน
การนำความรู้ไปประยุกต์ใช้งานจริง
แหล่งเรียนรู้ที่แนะนำ ได้แก่ Official Documentation ที่อัพเดทล่าสุดเสมอ Online Course จาก Coursera Udemy edX ช่อง YouTube คุณภาพทั้งไทยและอังกฤษ และ Community อย่าง Discord Reddit Stack Overflow ที่ช่วยแลกเปลี่ยนประสบการณ์กับนักพัฒนาทั่วโลก
เปรียบเทียบข้อดีและข้อเสีย
จากตารางเปรียบเทียบจะเห็นว่าข้อดีมีมากกว่าข้อเสียอย่างชัดเจน โดยเฉพาะในแง่ของประสิทธิภาพและความสามารถในการ Scale สำหรับข้อเสียส่วนใหญ่สามารถแก้ไขได้ด้วยการเรียนรู้อย่างเป็นระบบและวางแผนทรัพยากรให้เหมาะสม
Demand and Supply คืออะไร
อุปสงค์ อุปทาน Law of Demand Supply Equilibrium ดุลยภาพ Surplus Shortage Curve ราคาขึ้น ซื้อลด ขายเพิ่ม Invisible Hand
ปัจจัยที่มีผลมีอะไร
Demand Income Taste Substitutes Complements Population Expectation Supply Cost Technology Sellers Policy Weather Shift Curve
Elasticity คืออะไร
PED %Change Qd / %Change P Elastic > 1 Inelastic < 1 Unit = 1 สินค้าจำเป็น Inelastic ฟุ่มเฟือย Elastic Income Cross Elasticity
ประยุกต์ใช้อย่างไร
Dynamic Pricing Airline Revenue Housing Commodity Government Price Floor Ceiling Tax Subsidy Algorithm A/B Testing Recommendation
สรุป
Demand Supply อุปสงค์ อุปทาน Equilibrium Elasticity Pricing Shift Surplus Shortage PDF Economics Application Production
