Technology

demand and supply pdf

demand and supply pdf
demand and supply pdf | SiamCafe Blog
2025-10-20· อ. บอม — SiamCafe.net· 11,672 คำ

Demand and Supply

Demand Supply อุปสงค์ อุปทาน Equilibrium ดุลยภาพ Elasticity Pricing Surplus Shortage Law Economics PDF

ConceptLawCurveShift Factors
Demand (อุปสงค์)ราคาขึ้น ซื้อลดลาดลง (Downward)Income Taste Substitutes Population
Supply (อุปทาน)ราคาขึ้น ขายเพิ่มลาดขึ้น (Upward)Cost Technology Sellers Policy
EquilibriumD = Sจุดตัด D&SShift D หรือ S → ดุลยภาพใหม่
SurplusP > Eq PriceS > Dราคาลดลงสู่ดุลยภาพ
ShortageP < Eq PriceD > 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}")

เคล็ดลับ

การนำความรู้ไปประยุกต์ใช้งานจริง

แหล่งเรียนรู้ที่แนะนำ ได้แก่ Official Documentation ที่อัพเดทล่าสุดเสมอ Online Course จาก Coursera Udemy edX ช่อง YouTube คุณภาพทั้งไทยและอังกฤษ และ Community อย่าง Discord Reddit Stack Overflow ที่ช่วยแลกเปลี่ยนประสบการณ์กับนักพัฒนาทั่วโลก

เปรียบเทียบข้อดีและข้อเสีย

ข้อดีข้อเสีย
ประสิทธิภาพสูง ทำงานได้เร็วและแม่นยำ ลดเวลาทำงานซ้ำซ้อนต้องใช้เวลาเรียนรู้เบื้องต้นพอสมควร มี Learning Curve สูง
มี Community ขนาดใหญ่ มีคนช่วยเหลือและแหล่งเรียนรู้มากมายบางฟีเจอร์อาจยังไม่เสถียร หรือมีการเปลี่ยนแปลงบ่อยในเวอร์ชันใหม่
รองรับ Integration กับเครื่องมือและบริการอื่นได้หลากหลายต้นทุนอาจสูงสำหรับ Enterprise License หรือ Cloud Service
เป็น Open Source หรือมีเวอร์ชันฟรีให้เริ่มต้นใช้งานต้องการ Hardware หรือ Infrastructure ที่เพียงพอ

จากตารางเปรียบเทียบจะเห็นว่าข้อดีมีมากกว่าข้อเสียอย่างชัดเจน โดยเฉพาะในแง่ของประสิทธิภาพและความสามารถในการ 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

📖 บทความที่เกี่ยวข้อง

how to trade supply and demand in forexอ่านบทความ → demand supply zoneอ่านบทความ → supply and demandอ่านบทความ → head and shoulders pattern pdfอ่านบทความ → law of supply and demandอ่านบทความ →

📚 ดูบทความทั้งหมด →