[table][tr][td]賞金[/td][td]500円[/td][td]300円[/td][td]100円[/td][td]0円[/td][/tr][tr][td]確率[/td][td][math]\frac{2}{100}[/math][/td][td][math]\frac{5}{100}[/math][/td][td][math]\frac{20}{100}[/math][/td][td][math]\frac{73}{100}[/math][/td][/tr][/table]賞金の期待値は [math]500\times\frac{2}{100}+300\times\frac{5}{100}+100\times\frac{20}{100}+0\times\frac{73}{100}=45[/math]
これをGeoGebraでやるには入力バーで賞金(list1)と確率(list2)の[url=https://geogebra.github.io/docs/manual/ja/%E3%83%AA%E3%82%B9%E3%83%88/]リスト[/url]を作るコマンドを入力する. [br][code] list1={500,300,100,0}[/code] [br][code] list2={2/100,5/100,20/100,73/100}[/code][br]これらの積を求めるために,入力バーで[br][code] list1*list2[/code] [br]と入力すると {10,15,20,0} と要素同士をかけたものが出てくるだけであるから,[br]それらの和を求めるために [url=https://geogebra.github.io/docs/manual/ja/commands/Sum/]Sumコマンド[/url]を使って[br] [code]sum(list1 * list2)[/code][br]と入力すると,期待値75が得られる.
[table][tr][td]賞金[/td][td]200円[/td][td]100円[/td][td]0円[/td][td]合計[/td][/tr][tr][td]本数[/td][td]20本[/td][td]50本[/td][td]80本[/td][td]150本[/td][/tr][/table]賞金と本数が上のようになっているくじから1本を引くとき,賞金の期待値を求めよう.
[code]sum({200,100,0},{20,50,80})/150[br][/code][br]と一気に入力することも可能. 答 60
上の練習問題は[br][url=https://geogebra.github.io/docs/manual/ja/commands/Mean/]Mean( <数値のリスト>, <度数のリスト> )コマンド[/url](平均値を求める)を使うことも可能.[br][code]mean({200,100,0},{20,50,80})[br][/code]他にも [url=https://geogebra.github.io/docs/manual/ja/commands/Variance/]Variance (分散)[/url][url=https://geogebra.github.io/docs/manual/ja/commands/SD/]SD(標準偏差[/url])のコマンドもある.[br][code]variance({200,100,0},{20,50,80}) [/code] → 5066.67[br][code]sd({200,100,0},{20,50,80}) [/code] → 71.18[br]