Skip to content

平成29年度 春期 ITパスポート試験 問91

This question's explanation and your answers so far.

問91
頻出度★★☆

表計算ソフトを用いて,天気に応じた売行きを予測する。表は,予測する日の天気(晴れ,曇り,雨)の確率,商品ごとの天気別の売上予測額を記入したワークシートである。セルE4に商品Aの当日の売上予測額を計算する式を入力し,それをセルE5~E6に複写して使う。このとき,セルE4に入力する適切な式はどれか。ここで,各商品の当日の売上予測額は,天気の確率と天気別の売上予測額の積を求めた後,合算した値とする。

ABCDE
1天気晴れ曇り雨
2天気の確率0.50.30.2
3商品名晴れの日の売上予測額曇りの日の売上予測額雨の日の売上予測額当日の売上予測額
4商品A300,000100,00080,000
5商品B250,000280,000300,000
6商品C100,000250,000350,000
出典 平成29年度 春期 ITパスポート試験 問91
解説

問 91

  • Incorrectア

    Since all references are relative, copying to E5 changes it to B3*B5+C3*C5+D3*D5. The references that should point to the weather probabilities shift to row 3 (the heading “Product name” row), so they cannot be multiplied by the probabilities and the correct expected value cannot be obtained. Incorrect.

  • イ

    正解 The formula in cell E4 represents the value obtained by taking, for each weather, the weather probability × the predicted sales amount for that weather, and then summing the results for all three types of weather. The probabilities are in row 2 (B2=0.5, C2=0.3, D2=0.2), and product A's sales by weather are in row 4 (B4, C4, D4), so the basic form of the formula is B2*B4+C2*C4+D2*D4. When this formula is copied downward from E4 to E5 and E6, the row numbers increase by one each time. The references to the predicted sales amounts (B4, C4, D4) should shift to the rows of product B and product C, so leaving them as relative references is fine; but the references to the weather probabilities should always point to row 2, so only the row number needs to be fixed. Therefore, by making the row an absolute reference — B$2, C$2, D$2 — even after copying, B$2 and the others keep pointing to row 2, and only the sales side shifts correctly to B5 and B6. Since the copying stays within the same column E, the column does not change, so fixing the column is unnecessary. Thus, イ, B$2*B4+C$2*C4+D$2*D4, is correct.

  • Incorrectウ

    This formula shifts the probability side down (in $B2, the row number 2 is relative) while fixing the sales side (B$4). The side that should be fixed and the side that should shift are reversed: after copying, the probability side shifts to row 3, while the sales side always stays at row 4 (product A). Even in E5 and E6 it uses product A's sales, so products B and C cannot be calculated. Incorrect.

  • Incorrectエ

    Since all references are absolute, even after copying it stays as $B$2*$B$4+… without any change. E5 and E6 also keep displaying product A's values, so the predicted sales amounts for the day for products B and C are not calculated. Incorrect.

ここがポイント
  • When copying, use relative references for those you want to shift along the direction of copying, and add $ to those you want to fix. To fix only the row, put $ before the row number (e.g., B$2). The key point here is to fix only the row of the weather probabilities (row 2), which serve as the common coefficients.
  • When copying downward, the row numbers change, and as long as it stays within the same column, the column does not change. Therefore, $ on the column is unnecessary; by making only the probability row's row absolute, only the sales references shift correctly to products B and C.
用語

Your answers