// LabBestResponseSpecs.swift. 11/22/2020. import Foundation class LabBestResponseSpecs { let strBestResponseCournotSpecs :String = """ `` ******** Lab Specs // Demand slider specs // Firm A demand function 20000 80000 10000 40000 // 0: Demand function constant -400 -100 50 -100 // 1: Demand function price coefficient 0 1 .1 .5 // 2: Cross price coefficient // Firm B demand function 20000 80000 10000 40000 // 3: Demand function constant -400 -100 50 -100 // 4: Demand function price coefficient 0 1 .1 .5 // 5: Cross price coefficient // Cost slider specs // Firm A cost function 0 800000 200000 0 // 6: Fixed cost 50 150 10 150 // 7: Linear cost .000 .020 .005 .000 // 8: Quadratic cost // Firm B cost function 0 800000 200000 0 // 9: Fixed cost 50 150 10 50 // 10: Linear cost .000 .020 .005 .000 // 11: Quadratic cost `` **** Prob Specs ` ******** Problem 0 Start Screen 1 - Cournot Model: Finding Firm B's Best Response Curve // 0: Title Cournot // 1: Type of game // Visibility of Sliders L L N // 2: Demand constant, own price coef, cross price coef L L N // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves F T // 4: Firm A and B // (Quantity/Price) Price slider specs QA QB // 5: Slider names 0 30000 500 5000 // 6: Firm A 0 30000 500 5000 // 7: Firm B // Graph specs QA_(1,000s) QB_(1,000s) // 8: Axis names 0 0 30000 30000 1000 1000 // 9: Market graph axis specs ` Text Start // 10: Text `RED`BLDObjective:`BLD Construct Firm B's best response curve for the Cournot model. In the Cournot model, Firm B assumes that Firm A's production remains constant.`BLK Initially, Firm A's production equals 5,000 as indicated by the red vertical line intersecting Firm A's axis at 5,000. To find the point on Firm B's best response curve corresponding to Firm A's production of 5,000, we must only determine Firm B's profit maximizing quantity when Firm A's production remains at 5,000. To do so, adjust Firm B's vertical quantity scrollbar (located to the left of the graph). How can we find more points on Firm B's best response curve? `0x2022 Change Firm A's production. `0x2022 Find Firm B's profit maximizing quantity. For example, use Firm A's horizontal scrollbar to increase its production from 5,000 to 10,000. Next, focus on Firm B's vertical quantity scrollbar. Adjust Firm B's scrollbar to find its profit maximizing quantity while Firm A's production remains 10,000. You have found a second point on Firm B's best response curve. By continuing this procedure, trace out Firm B's best response curve. Firm B's response curve is downward sloping. When Firm A increases production Firm B responds by reducing production indicating that the goods are strategic substitutes. ` Prob End ` ******** Problem 1 Start Screen 2 - Cournot Model: Finding Firm A's Best Response Curve // 0: Title Cournot // 1: Type of game // Visibility of Sliders L L N // 2: Demand constant, own price coef, cross price coef L L N // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves T F // 4: Firm A and B // (Quantity/Price) Price slider specs QA QB // 5: Slider names 0 30000 500 5000 // 6: Firm A 0 30000 500 5000 // 7: Firm B // Graph specs QA_(1,000s) QB_(1,000s) // 8: Axis names 0 0 30000 30000 1000 1000 // 9: Market graph axis specs ` Text Start // 10: Text `RED`BLDObjective:`BLD Construct Firm A's best response curve for the Cournot model. In the Cournot model, Firm A assumes that Firm B's production remains constant.`BLK Initially, Firm B's production equals 5,000 as indicated by the blue horizontal line intersecting Firm B's axis at 5,000. To find the point on Firm A's best response curve corresponding to Firm B's production of 5,000, we must only determine Firm A's profit maximizing quantity when Firm B's production remains at 5,000. To do so, use Firm A's horizontal quantity scrollbar (located beneath the graph). How can we find more points on Firm A's best response curve? `0x2022 Change Firm B's production. `0x2022 Find Firm A's profit maximizing quantity. For example, use Firm B's vertical scrollbar to increase its production from 5,000 to 10,000. Next, focus on Firm A's horizontal quantity scrollbar. Adjust Firm A's scrollbar to find its profit maximizing quantity while Firm B's production remains 10,000. You have found a second point on Firm A's best response curve. By continuing this procedure, trace out Firm A's best response curve. Firm A's response curve is downward sloping. When Firm B increases production Firm A responds by reducing production indicating that the goods are strategic substitutes. ` Prob End ` ******** Problem 2 Start Screen 3 - Cournot Model: Equilibrium // 0: Title Cournot // 1: Type of game // Visibility of Sliders L L N // 2: Demand constant, own price coef, cross price coef L L N // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves T T // 4: Firm A and B // (Quantity/Price) Price slider specs QA QB // 5: Slider names 0 30000 500 2500 // 6: Firm A 0 30000 500 5000 // 7: Firm B // Graph specs QA_(1,000s) QB_(1,000s) // 8: Axis names 0 0 30000 30000 1000 1000 // 9: Market graph axis specs ` Text Start // 10: Text `RED`BLDObjective:`BLD Illustrate the Cournot equilibrium, the quantities Firm A and Firm B produce when each firm assumes that the other firm's production remains constant.`BLK As you can see from the graph, neither firm is producing on its best response curve initially. `BLDQuestion:`BLD Would Firm A be content with this situation? Assuming that Firm A takes Firm B's production as constant, the answer is NO. To maximize its profit, Firm A must produce on its best response curve. Use Firm A's quantity scrollbar to move its production to its curve. `BLDQuestion:`BLD Would Firm B be content with this new situation? Assuming that Firm B takes Firm A's production as constant, the answer is NO. To maximize its profit, Firm B must produce on its best response curve. Use Firm B's quantity scrollbar to move its production to its curve. Now reconsider Firm A. Would Firm A be content with this situation? If not, use Firm A's quantity scrollbar to move Firm A's production to its best response curve. Would Firm B be content with this situation? If not, use Firm B's quantity scrollbar to move Firm B's production to its best response curve. Continue with this process. `BLDQuestion:`BLD Do we eventually converge to a Nash equilibrium? ` Prob End """ ` ******** Problem Test Start Screen Test - Cournot Model: Best Responses // 0: Title Cournot // 1: Type of game // Visibility of Sliders B B N // 2: Demand constant, own price coef, cross price coef B B N // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves T T // 4: Firm A and B // (Quantity/Price) Price slider specs QA QB // 5: Slider names 0 30000 500 5000 // 6: Firm A 0 30000 500 5000 // 7: Firm B // Graph specs QA_(1,000s) QB_(1,000s) // 8: Axis names 0 0 30000 30000 1000 1000 // 9: Market graph axis specs ` Text Start // 10: Text ` Prob End let strBestResponseBertrandSpecs :String = """ `` ******** Lab Specs // Demand slider specs // Firm A demand function 20000 80000 10000 40000 // 0: Demand function constant -400 -100 50 -100 // 1: Demand function price coefficient 0 100 5 40 // 2: Cross price coefficient // Firm B demand function 20000 80000 10000 40000 // 3: Demand function constant -400 -100 50 -100 // 4: Demand function price coefficient 0 100 5 40 // 5: Cross price coefficient // Cost slider specs // Firm A cost function 0 800000 200000 0 // 6: Fixed cost 100 300 10 160 // 7: Linear cost .000 .020 .005 .000 // 8: Quadratic cost // Firm B cost function 0 800000 200000 0 // 9: Fixed cost 100 300 10 160 // 10: Linear cost .000 .020 .005 .000 // 11: Quadratic cost `` **** Prob Specs ` ******** Problem 0 Start Screen 1 - Product Differentiation Bertrand Model: Best Responses // 0: Title Bertrand // 1: Type of game // Visibility of Sliders L L L // 2: Demand constant, own price coef, cross price coef L L N // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves F T // 4: Firm A and B // (Quantity/Price) Price slider specs PA PB // 5: Slider names 0 500 10 100 // 6: Firm A 0 500 10 100 // 7: Firm B // Graph specs PA PB // 8: Axis names 0 0 500 500 // 9: Market graph axis specs ` Text Start // 10: Text `RED`BLDObjective:`BLD Construct Firm B's best response curve for the Bertrand model. In the Bertrand model, Firm B assumes that Firm A's price remains constant.`BLK Initially, Firm A's price equals $100 as indicated by the red vertical line intersecting Firm A's axis at 100. To find the point on Firm B's best response curve corresponding to Firm A's price of $100, we must only determine Firm B's profit maximizing price when Firm A's price remains at $100. To do so, use Firm B's vertical price scrollbar (located to the left of the graph). How can we find more points on Firm B's best response curve? `0x2022 Change Firm A's price. `0x2022 Find Firm B's profit maximizing price. For example, use Firm A's horizontal price scrollbar to increase its price from $100 to $200. Next, focus on Firm B's vertical price scrollbar. Adjust Firm B's vertical price scrollbar to find its profit maximizing price when Firm A's price remains $200. You have found a second point on Firm A's best response curve. By continuing this procedure, trace out Firm B's best response curve. Firm B's response curve is upward sloping. When Firm A increases the price Firm B responds by increasing the price also indicating that the goods are strategic complements. ` Prob End ` ******** Problem 1 Start Screen 2 - Product Differentiation Bertrand Model: Best Responses // 0: Title Bertrand // 1: Type of game // Visibility of Sliders L L L // 2: Demand constant, own price coef, cross price coef L L N // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves T F // 4: Firm A and B // (Quantity/Price) Price slider specs PA PB // 5: Slider names 0 500 10 100 // 6: Firm A 0 500 10 100 // 7: Firm B // Graph specs PA PB // 8: Axis names 0 0 500 500 // 9: Market graph axis specs ` Text Start // 10: Text `RED`BLDObjective:`BLD Construct Firm A's best response curve for the Bertrand model. In the Bertrand model, Firm A assumes that Firm B's price remains constant.`BLK Initially, Firm B's price equals $100 as indicated by the blue horizontal line intersecting Firm B's axis at 100. To find the point on Firm A's best response curve corresponding to Firm B's price of $100, we must only determine Firm A's profit maximizing price when Firm B's price remains at $100. To do so, use Firm A's horizontal price scrollbar (located beneath the graph). How can we find more points on Firm A's best response curve? `0x2022 Change Firm B's price. `0x2022 Find Firm A's profit maximizing price. For example, use Firm B's horizontal price scrollbar to increase its price from $100 to $200. Next, focus on Firm A's horizontal price scrollbar. Adjust Firm A's horizontal price scrollbar to find its profit maximizing price when Firm A's price remains $200. You have found a second point on Firm A's best response curve. By continuing this procedure, trace out Firm A's best response curve. Firm A's response curve is upward sloping. When Firm B increases the price Firm A responds by increasing the price also indicating that the goods are strategic complements. ` Prob End ` ******** Problem 2 Start Screen 3 - Product Differentiation Bertrand Model: Best Responses // 0: Title Bertrand // 1: Type of game // Visibility of Sliders L L L // 2: Demand constant, own price coef, cross price coef L L N // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves T T // 4: Firm A and B // (Quantity/Price) Price slider specs PA PB // 5: Slider names 0 500 10 100 // 6: Firm A 0 500 10 100 // 7: Firm B // Graph specs PA PB // 8: Axis names 0 0 500 500 // 9: Market graph axis specs ` Text Start // 10: Text `RED`BLDObjective:`BLD Illustrate the Bertrand equilibrium, the prices Firm A and Firm B charge when each firm assumes that the other firm's price remains constant.`BLK As you can see from the graph, neither firm's price is on its best response curve initially. `BLDQuestion:`BLD Would Firm A be content with this situation? Assuming that Firm A takes Firm B's price as constant, the answer is NO. To maximize its profit, Firm A must charge a price on its best response curve. Use Firm A's price scrollbar to move its price to its curve. `BLDQuestion:`BLD Would Firm B be content with this new situation? Assuming that Firm B takes Firm A's price as constant, the answer is NO. To maximize its profit, Firm B must charge a price on its best response curve. Use Firm B's price scrollbar to move its price to its curve. Now reconsider Firm A. Would Firm A be content with this situation? If not, use Firm A's price scrollbar to move Firm A's price to its best response curve. Would Firm B be content with this situation? If not, use Firm B's price scrollbar to move Firm B's price to its best response curve. `BLDQuestion:`BLD Do we eventually converge to a Nash equilibrium? ` Prob End """ ` ******** Problem Test Start Screen Test - Bertrand Model: Best Responses // 0: Title Bertrand // 1: Type of game // Visibility of Sliders B B B // 2: Demand constant, own price coef, cross price coef B B B // 3: Cost parameters: constant, linear coef, quadratic coef // Draw best response curves T T // 4: Firm A and B // (Quantity/Price) Price slider specs PA PB // 5: Slider names 0 500 10 100 // 6: Firm A 0 500 10 100 // 7: Firm B // Graph specs PA PB // 8: Axis names 0 0 500 500 // 9: Market graph axis specs ` Text Start // 10: Text ` Prob End let strBestResponseWNSpecs :String = """ `` ******** Lab Specs // Demand slider specs // Firm A demand function 400 2000 200 800 // 0: Constant -3 -1 .25 -1 // 1: Own price coefficient 0 1 .1 .5 // 2: Cross price coefficient // Firm B demand function 400 2000 200 800 // 3: Constant -3 -1 .25 -1 // 4: Own price coefficient 0 1 .1 .5 // 5: Cross price coefficient // Cost slider specs // Firm A cost function 0 100 10 0 // 6: Constant 0 300 20 200 // 7: Linear coefficient 0 .5 .1 0 // 8: Quadratic coefficient // Firm B cost function 0 100 10 0 // 9: Constant 0 300 20 200 // 10: Linear coefficient 0 .5 .1 0 // 11: Quadratic coefficient `` Prob Specs ` **** Problem 0 Start: Cournot Screen 1 - Cournot Best Responses // 0: Title Cournot // 1: Type of game // Visibility of Sliders B B B // 2: Demand constant, own price coef, cross price coef B B B // 3: Cost parameters: constant, linear coef, quadratic coef // Best response checkboxes visible and selected T T T T // 4: Firm A (visible and selected); Firm B (visible and selected) // (Quantity/Price) Price slider specs QA QB // 5: Slider names 0 800 25 100 // 6: Firm A 0 800 25 100 // 7: Firm B // Graph specs QA QB // 8: Axis names 0 0 1000 1000 // 9: Axis range data ` Text Start // 10: Text Cournot Equilibrium Reproducing WN's calculations, p.530. Inverse demand function: P = 800 - Q Demand function Q = 800 - P Cost function: Ci = 200 x Qi Best response: Qi = (800 - Qj - 200)/2 = 300 - Q/2 Equilibrium Qi: (800 - 200)/3 = 200 ` Prob End ` **** Problem 1 Start: Bertrand Screen 2 - Bertrand Best Responses // 0: Title Bertrand // 1: Type of game // Visibility of Sliders B B B // 2: Demand constant, own price coef, cross price coef B B B // 3: Cost parameters: constant, linear coef, quadratic coef // Best response checkboxes visible and selected T T T T // 4: Firm A (visible and selected); Firm B (visible and selected) // (Quantity/Price) Price slider specs PA PB // 5: Slider names 0 800 25 100 // 6: Firm A price 0 800 25 100 // 7: Firm B pricey // Graph specs PA PB // 8: Axis names 0 0 800 800 // 9: Axis range data ` Text Start // 10: Text Bertrand Best Responses Reproducing WN's calculations, p.537: Demand function: Qi = 600 - Pi + .5xPj Cost function: Ci = 0 NB: Change the demand and cost function to the correct values. Best response: Pi = (600 + Pj/2)/2 = 300 + Pi/4 Equilibrium Pi: (8*600)/15 + (2*600)/15 = 400 ` Prob End """ }