document.write( "Question 1167588: Textbook prices have a seasonal structure on Ebay. At the end of a term, the supply of used books outstrips demand, and the price is lower. Near the start of a term, many students are looking for books, and the price is higher. Suppose we can classify sales for a particular chemistry textbook into these two time periods and an \"other\" time period in the proportions shown below. We have also listed the average price the textbook sells for in each of these three time periods
\n" );
document.write( "Start-of-term End-of-term Other
\n" );
document.write( "Sales proportion 0.45 0.31 0.24
\n" );
document.write( "Average price $82.52 $49.12 $65.23
\n" );
document.write( "For example, about 45% of Ebay auctions for this chemistry textbook occur at the start of the term and the books sell for an average of $82.52 during this time. Using the information above, compute the average price of the textbook over all seasons \n" );
document.write( "
Algebra.Com's Answer #852322 by CPhill(1987) You can put this solution on YOUR website! This is a weighted average problem. To find the overall average price of the textbook, you need to multiply the average price for each period by its corresponding sales proportion (weight) and sum the results.\r \n" ); document.write( "\n" ); document.write( "The overall average price ($\bar{P}$) is calculated as: \n" ); document.write( "$$\bar{P} = (\text{Price}_{\text{Start}} \times \text{Proportion}_{\text{Start}}) + (\text{Price}_{\text{End}} \times \text{Proportion}_{\text{End}}) + (\text{Price}_{\text{Other}} \times \text{Proportion}_{\text{Other}})$$\r \n" ); document.write( "\n" ); document.write( "Here are the values: \n" ); document.write( "| Time Period | Sales Proportion ($w_i$) | Average Price ($P_i$) | \n" ); document.write( "| :--- | :--- | :--- | \n" ); document.write( "| Start-of-term | $0.45$ | $\$82.52$ | \n" ); document.write( "| End-of-term | $0.31$ | $\$49.12$ | \n" ); document.write( "| Other | $0.24$ | $\$65.23$ |\r \n" ); document.write( "\n" ); document.write( "**Calculation:** \n" ); document.write( "$$\bar{P} = (0.45 \times \$82.52) + (0.31 \times \$49.12) + (0.24 \times \$65.23)$$\r \n" ); document.write( "\n" ); document.write( "```python?code_reference&code_event_index=2 \n" ); document.write( "# Define the data \n" ); document.write( "proportions = [0.45, 0.31, 0.24] \n" ); document.write( "prices = [82.52, 49.12, 65.23]\r \n" ); document.write( "\n" ); document.write( "# Calculate the weighted average price \n" ); document.write( "weighted_average_price = sum(p * w for p, w in zip(prices, proportions))\r \n" ); document.write( "\n" ); document.write( "# Print the result \n" ); document.write( "print(f\"Start-of-term contribution: {proportions[0] * prices[0]}\") \n" ); document.write( "print(f\"End-of-term contribution: {proportions[1] * prices[1]}\") \n" ); document.write( "print(f\"Other contribution: {proportions[2] * prices[2]}\") \n" ); document.write( "print(f\"Weighted Average Price: {weighted_average_price}\")\r \n" ); document.write( "\n" ); document.write( "```\r \n" ); document.write( "\n" ); document.write( "```text?code_stdout&code_event_index=2 \n" ); document.write( "Start-of-term contribution: 37.134 \n" ); document.write( "End-of-term contribution: 15.2272 \n" ); document.write( "Other contribution: 15.6552 \n" ); document.write( "Weighted Average Price: 68.0164\r \n" ); document.write( "\n" ); document.write( "```\r \n" ); document.write( "\n" ); document.write( "The average price of the textbook over all seasons is **$68.02**.\r \n" ); document.write( "\n" ); document.write( "This is calculated by taking the **weighted average** of the prices, using the sales proportion for each period as the weight:\r \n" ); document.write( "\n" ); document.write( "$$\begin{aligned} \text{Average Price} &= (0.45 \times \$82.52) + (0.31 \times \$49.12) + (0.24 \times \$65.23) \\ &= \$37.134 + \$15.2272 + \$15.6552 \\ &= \$68.0164\end{aligned}$$\r \n" ); document.write( "\n" ); document.write( "Rounding to two decimal places, the average price is **$68.02**. \n" ); document.write( " |