%
%	gbb60166@gmail.com	https://unilab.gbb60166.jp/prekou/prekou.htm
%
% aspectratio= は 1610, 169, 149, 54, 32 の中から選べる（省略時は 43）
% C:\texlive\2023\texmf-dist\tex\latex\beamer\beamer.cls
%\documentclass[20pt,dvipdfmx,usepdftitle=false,hyperref={pdfpagemode=FullScreen},aspectratio=169]{beamer}
%\documentclass[20pt,dvipdfmx,usepdftitle=false,hyperref={pdfstartview={XYZ null null 8.00}},aspectratio=169]{beamer}
\documentclass[20pt,dvipdfmx,usepdftitle=false,aspectratio=169]{beamer}
% pdfの栞の字化けを防ぐ
%\AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}
% テーマ
\usetheme{Copenhagen}
% navi. symbolsは目立たないが，dvipdfmxを使うと機能しないので非表示に
\setbeamertemplate{navigation symbols}{} 
\usepackage{bxdpx-beamer,pxjahyper,minijs}
%\usepackage{graphicx}
%\usepackage{tkokugo,furikana,tsayusen,shiika,sfkanbun,jdkintou,plext}
\usepackage{type1cm}
\usepackage[deluxe]{otf}
%\usepackage{tikzsymbols}
%\usepackage[dvipdfmx]{graphicx}%
\def\pgfsysdriver{pgfsys-dvipdfmx.def}%（graphicxパッケージを使用しない場合はこの行を有効に）
%\def\pgfsysdriver{pgfsys-dvips.def}%デフォルト
%\usepackage[e]{esvect}
\usepackage{tikz}%（これで、pgfとpgfforが読み込まれます。）
%\usepackage{tikz-3dplot}
%\usetikzlibrary{calc}
%\usetikzlibrary{arrows.meta,patterns,angles,intersections,backgrounds}
%\usepackage{animate}
%\usepackage{pgfplots}
%\pgfplotsset{compat=newest}
%\pgfplotsset{compat=newest, every axis/.append style={line width=1pt}}
%\PassOptionsToPackage{dvipdfmx}{graphicx}
\nofiles

\hypersetup{% Jul 18 2023
	pdftitle={プレ高数学科（LaTeX Beamer で汎用PDFプレゼンを作る）},
	pdfauthor={gbb60166@gmail.com},
	pdfsubject={https://unilab.gbb60166.jp/prekou/prekou.htm}
	}

% フォントはお好みで
%\usepackage{txfonts}

\mathversion{bold}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\seriesdefault}{bx}
\renewcommand{\kanjifamilydefault}{\gtdefault}
\renewcommand{\kanjiseriesdefault}{bx}
\setbeamerfont{title}{size=\normalsize,series=\bfseries}
\setbeamerfont{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{frametitle}[default][center]
\usefonttheme{professionalfonts}

% 参考にしたURL
% http://windom.phys.hirosaki-u.ac.jp/fswiki/wiki.cgi?page=LaTeX+Beamer%A4%C7%A5%D7%A5%EC%A5%BC%A5%F3%A5%C6%A1%BC%A5%B7%A5%E7%A5%F3

\newcommand{\Slash}[1]{\ooalign{\hfil\kern-3pt／\hfil\crcr$#1$}}
\everymath{\displaystyle}

\newcommand{\maruwaku}[1]{\begin{tikzpicture}[scale=0.7, baseline={([yshift=-22pt] current bounding box.north)}]
\filldraw[color=CUDBlue, line width=1pt, rounded corners=2pt] (-0.1,0)--(2.1,0)--(2.1,1.1)--(-0.1,1.1)--cycle;
\draw(1,0.5) node[white]{#1};
\end{tikzpicture}
}

\setbeamersize{text margin left=5mm,text margin right=5mm}
\fboxrule=0.8pt

\makeatletter
\newcommand{\hooklen}[2]{\settowidth{\@tempdima}{\(#1\)}
%\advance\@tempdima by.3ex
% ↑ 数式モードで式の前後に入るスペースを制御したかったが、
%    難しいのでやめた。段々難解なコードになっているのでやめた方がよい？
\hbox to\@tempdima{\hfil \(#2\)\hfil}}
%■等号付き不等号 by 美文書作成入門
\newcommand{\myleqq}{\mathrel{\mathpalette\gl@align<}}
\newcommand{\mygeqq}{\mathrel{\mathpalette\gl@align>}}
\newcommand{\gl@align}[2]{\lower.6ex\vbox{\baselineskip\z@skip\lineskip\z@
	\ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}
\makeatother

% カラーユニバーサルデザインを調べたつもりだがあまり自信がありません
% http://www.fukushihoken.metro.tokyo.jp/kiban/machizukuri/kanren/color.files/colorudguideline.pdf
% http://jfly.iam.u-tokyo.ac.jp/colorset/

% ■ アクセントカラー小面積を目立たせる高彩度色
\definecolor{CUDRed}{RGB}{255,75,0}
\definecolor{CUDGreen}{RGB}{3,175,122}
\definecolor{CUDBlue}{RGB}{0,90,255}
\definecolor{CUDCyan}{RGB}{77,196,255}
\definecolor{CUDMagenta}{RGB}{153,0,153}
\definecolor{CUDYellow}{RGB}{255,241,0}
\definecolor{CUDBrown}{RGB}{128,64,0}

\definecolor{CUDOrange}{RGB}{246,170,0}

% ■ ベースカラー広い面積の塗り分けに用いる低・中彩度色
\definecolor{CUDPink}{RGB}{255,202,191}
\definecolor{CUDBrightGreen}{RGB}{119,217,168}
\definecolor{CUDLime}{RGB}{216,242,85}
\definecolor{CUDCream}{RGB}{255,255,128}
\definecolor{CUDBrightCyan}{RGB}{191,228,255}
%\definecolor{CUD}{RGB}{}%

\setbeamercolor{CUDBrightGreen}{fg=black,bg=CUDBrightGreen!50}
\setbeamercolor{CUDBrightCyan}{fg=black,bg=CUDBrightCyan}
\setbeamercolor{CUDCream}{fg=black,bg=CUDCream!75}

\newcommand{\myfrac}[2]{\mathchoice%■ 修正 Oct 8,2023
	{%\fontsize{20}{20}\selectfont%	\displaystyle
		\frac{\raisebox{-.6ex}{\(#1\)}}{\raisebox{.4ex}{\(#2\)}}}%
	{\textstyle{\frac{#1}{#2}}}%	\textstyle
	{%\fontsize{13}{13}\selectfont%	\scriptstyle
		\frac{\raisebox{0ex}{\(#1\)}}{\raisebox{-.4ex}{\(#2\)}}}%
	{%\fontsize{11}{11}\selectfont%	\scriptscriptstyle
		\frac{\raisebox{0ex}{\(#1\)}}{\raisebox{-.4ex}{\(#2\)}}}%
	}


\begin{document}

\title{プレ高数学科}\author{gbb60166}

%■ 本文と数式モードの間に挿入される空白スペース
%\mathsurround=-1pt
%■ \( \log\log \)でlogとlogの間に挿入される細スペース（省略形は \,）
%\thinmuskip=3mu
%■ \( a+b \)で+の前後に挿入される中スペース（省略形は \>）
%\medmuskip=2mu plus 1mu minus 1mu
\medmuskip=1mu
%■ \( x=5 \)で=の前後に挿入される太スペース（省略形は \;）
%\thickmuskip=5mu plus 5mu
\thickmuskip=3mu plus 2mu
% mu は math units の省略で長さの単位

\def\tosenbango{%
\draw(-1,10) node[left, CUDRed]{\footnotesize 本数字};
\draw(-1,8) node[left, CUDGreen]{\scriptsize ボーナス};

\foreach \x/\y in {0/{08},3/{10},6/{16},9/{20},12/{23}}
	\draw(\x,10) node[CUDRed]{\(\y\)};

\draw(0,8) node[CUDGreen]{\(06\)};

\foreach \x/\y in {0/{01},3/{02},6/{03},9/{04},12/{05},15/{07},18/{09}}
	\draw(\x,6) node{\(\y\)};
\foreach \x/\y in {0/{11},3/{12},6/{13},9/{14},12/{15},15/{17}}
	\draw(\x,4.5) node{\(\y\)};
\foreach \x/\y in {0/{18},3/{19},6/{21},9/{22},12/{24},15/{25}}
	\draw(\x,3) node{\(\y\)};
\foreach \x/\y in {0/{26},3/{27},6/{28},9/{29},12/{30},15/{31}}
	\draw(\x,1.5) node{\(\y\)};
}

%■■■■■■■■■■■■■　テスト領域　■■■■■■■■■■■■■■


%\end{document}
%■■■■■■■■■■■■■　完成品　■■■■■■■■■■■■■■

\begin{frame}[t]
\frametitle{ミニロトで数学しよう}
\vspace*{-12pt}
ミニロトとは全国都道府県及び全指定都市が発売して
いる『数字選択式宝くじ』のこと。$1$口$200$円で発売されている。

\centerline{\includegraphics[width=8cm]{miniloto1.jpg}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{申込カードを窓口に出すと記録用紙が渡される}
\centerline{\includegraphics[width=8cm]{miniloto3.jpg}}

\centerline{\href{http://kaz.in.coocan.jp/takarakuji/sim-miniloto.html}
	{\textcolor{CUDBlue}{\small web宝くじシミュレーター for ミニロト\ 
	\beamergotobutton{web}}}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{ミニロトの当籤条件}
\vspace*{-1.2ex}
\small
毎週火曜日に\colorbox{CUDLime!75}{$5$個の本数字}と、
\colorbox{CUDBrightGreen!75}{$1$個のボーナス数字}が発表される\\[-1.6ex]
\centerline{%
\begin{tikzpicture}[scale=0.6, thick, >=stealth, 
	baseline=(current bounding box.north)]
%\draw[help lines] (0,0) grid (23,8);
\fill[CUDCream] (0,7) rectangle ++(23,1.5);
\foreach \x in {0,1.5,3,5.5,7,8.5}{\draw(0,\x)--(23,\x);}
\foreach \x in {0,3,17,23}{\draw(\x,0)--(\x,8.5);}
\footnotesize
\draw(1.5,7.75) node{等級};
\draw(10,7.75) node{当籤条件};
\draw(20,7.75) node{見込み当籤金};
%
\draw(1.5,6.25) node{$1$等};
\draw(10,6.25) node{申込数字が本数字$5$個と全て一致};
\draw(20,6.25) node{約\ $1000$万円};
%
\draw(1.5,4.25) node{$2$等};
\draw(10,4.3) node[text width=15em,align=center]
	{申込数字が本数字$4$個と一致し\\ 更にボーナス数字$1$個と一致};
\draw(20,4.25) node{約\ $15$万円};
%
\draw(1.5,2.25) node{$3$等};
\draw(10,2.25) node{申込数字が本数字$4$個と一致};
\draw(20,2.25) node{約\ $1$万円};
%
\draw(1.5,0.75) node{$4$等};
\draw(10,0.75) node{申込数字が本数字$3$個と一致};
\draw(20,0.75) node{約\ $1000$円};
\end{tikzpicture}
}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{ミニロト当籤番号}
\centerline{\includegraphics[width=9cm]{loto_tosen.png}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\small A～E欄の中からそれぞれ$5$個の数字を塗りつぶしなさい}
\vspace*{-12pt}
{\scriptsize 支払額$1000$円}\quad %
\href{https://www.mizuhobank.co.jp/takarakuji/loto/miniloto/index.html}
	{\textcolor{CUDBlue}{\small ミニロト最新の当せん番号案内\ 
	\beamergotobutton{web}}}

\vfill
\centerline{\includegraphics[width=11cm]{miniloto1.jpg}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{$1$等の当籤確率は？}
\pause
すべての選び方は『$31$個の数字の中から$5$個選ぶ』
ので\( {}_{31}{\rm C}_5 \)となる。\pause

\[ \myfrac{31\times30\times29\times28\times27}{
	5\times4\times3\times2\times1}= 
169911\text{通り} \]
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{$1$等の当籤確率は？}
\pause
$1$等になるのは『本数字$5$個と全て一致』の$1$通りしかないので確率は

\[ \myfrac{1}{\ 169911\ }\quad\text{\□答} \]
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\small $2$等　本数字$4$個と一致し、更にボーナス数字$1$個と一致}
\vspace*{-30pt}
\begin{tikzpicture}[scale=0.6, thick, >=stealth, 
	baseline=(current bounding box.north)]
%\draw[help lines] (0,0) grid (23,10);

\tosenbango

\visible<3->{\draw[CUDMagenta,ultra thick](0,8)++(-1,-0.8)--++(3,0)--++(0,1.6)
		 node[midway,right,xshift=-12pt,fill=white,inner sep=1pt]
			{\small これは必ず選ぶ}
		--++(-3,0)--cycle;
	}
\visible<2->{\draw[CUDRed,ultra thick](0,10)++(-1,-0.8)--++(14,0)--++(0,1.6)
		 node[fill=CUDPink,yshift=1.2ex,inner sep=1pt]
			{\small この$5$個の中から$4$個選ぶ}
		--++(-14,0)--cycle;
	}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{$2$等の当籤確率は？}
\textcolor{CUDRed}{本数字$5$個の中から$4$個選べば
よい}ので\textcolor{CUDRed}{\( {}_{5}{\rm C}_4 \)}となる。\pause

\[ \myfrac{{}_{5}{\rm C}_4 }{\ 169911\ }= \pause \myfrac{5}{\ 169911\ }
	\quad\text{\□答} \]
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{$3$等　本数字$4$個と一致}
\vspace*{-30pt}
\begin{tikzpicture}[scale=0.6, thick, >=stealth, 
	baseline=(current bounding box.north)]
%\draw[help lines] (0,0) grid (23,10);

\tosenbango

\visible<2->{\draw[CUDRed,ultra thick](0,10)++(-1,-0.8)--++(14,0)
		--++(0,1.6) node[fill=CUDPink,inner sep=1pt,yshift=1.2ex,
			xshift=-12pt]{\small この$5$個の中から$4$個選ぶ}
		--++(-14,0)--cycle;
	}
\visible<3->{\draw[<-, CUDMagenta, line width=3pt](1,8)--(3,8.3)
		 node[right,inner sep=1pt]
			{\small これを選ぶと$2$等になってしまうので};
	}
\visible<4->{\draw[CUDBlue,ultra thick](0,1.5)++(-1,-0.8)--++(20.5,0)
		--++(0,6.4)--++(-20.5,0)
		node[pos=0.3,fill=CUDBrightCyan,xshift=-12pt,inner sep=1pt]
			{\small この$25$個の中から$1$個選ぶ}
		--cycle;
	}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{$3$等の当籤確率は？}
%\pause
\textcolor{CUDRed}{本数字$5$個から$4$個選んで}、
\textcolor{CUDBlue}{【本数字とボーナス数字】以外の$25$個から$1$個
選べばよい}ので
\( \textcolor{CUDRed}{{}_{5}{\rm C}_4} \times \textcolor{CUDBlue}{{}_{25}
{\rm C}_1} \)となる。

\vspace*{-12pt}
\[ \textcolor{CUDRed}{\tfrac{\ 5\times4\times3\times2\ }{
4\times3\times2\times1}} \times \textcolor{CUDBlue}{\tfrac{\,25\,}{1}}
=125\text{通り} \]

\pause
よって確率は\qquad\( \myfrac{125}{\ 169911\ } \)\quad\□答
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{$4$等　本数字$3$個と一致}
\vspace*{-30pt}
\begin{tikzpicture}[scale=0.6, thick, >=stealth, 
	baseline=(current bounding box.north)]
%\draw[help lines] (0,0) grid (23,10);

\tosenbango

\visible<2->{\draw[CUDRed,ultra thick](0,10)++(-1,-0.8)--++(14,0)--++(0,1.6)
		node[fill=CUDPink,inner sep=1pt,yshift=1.2ex]
			{\small この$5$個の中から$3$個選ぶ}
		--++(-14,0)--cycle;
	}
\visible<3->{\draw[CUDBlue,ultra thick](0,1.5)++(-1,-0.8)--++(20.5,0)
			--++(0,8.1)
		node[pos=0.87,fill=CUDBrightCyan,xshift=-5em,
			inner sep=1pt]{この$26$個の中から$2$個選ぶ}
		--++(-20.5,0)--cycle;
	}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{$4$等の当籤確率は？}
%\pause
\textcolor{CUDRed}{本数字$5$個から$3$個選んで}、
\textcolor{CUDBlue}{本数字以外の$26$個から$2$個選べばよい}ので
\( \textcolor{CUDRed}{{}_{5}{\rm C}_3} \times 
\textcolor{CUDBlue}{{}_{26}{\rm C}_2} \)となる。

\vspace*{-12pt}
\[ \textcolor{CUDRed}{\tfrac{\ 5\times4\times3\ }{
3\times2\times1}} \times 
\textcolor{CUDBlue}{\tfrac{\ 26\times25\ }{2\times1}}=3250\text{通り} \]

\pause
よって確率は\qquad\( \myfrac{3250 }{\ 169911\ } \)\quad\□答
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{ミニロトの期待値}
\vspace*{-20pt}
\begin{tikzpicture}[scale=0.6, thick, >=stealth, 
	baseline=(current bounding box.north)]
%\draw[help lines] (0,0) grid (23,8);

\fill[CUDCream](0,7.5) rectangle ++(23,1.5)
		(0,0) rectangle ++(23,1.5);

\foreach \x in {0,1.5,3,4.5,6,7.5,9}{\draw(0,\x)--(23,\x);}
\foreach \x in {3,6}{\draw(\x,1.5)--(\x,9);}
\foreach \x in {0,12,23}{\draw(\x,0)--(\x,9);}

\footnotesize
\draw(1.5,8.25) node{等級};
\draw(4.5,8.25) node{確率};
\draw(9,8.25) node{見込み当籤金};
\draw(17.5,8.25) node{\(\text{確率}\times\text{見込み当籤金}\)};

\draw(1.5,6.75) node{$1$等};
\draw(9,6.75) node{約\ $1000$万円};

\draw(1.5,5.25) node{$2$等};
\draw(9,5.25) node{約\ $15$万円};

\draw(1.5,3.75) node{$3$等};
\draw(9,3.75) node{約\ $1$万円};

\draw(1.5,2.25) node{$4$等};
\draw(9,2.25) node{約\ $1000$円};

\visible<2->{\draw(4.5,6.75) node{\(\tfrac{1}{\,169911\,}\)};
	\draw(20,6.75) node[left]{約\ $58.9$円};
	\draw(4.5,5.25) node{\(\tfrac{5}{\,169911\,}\)};
	\draw(20,5.25) node[left]{約\ $4.4$円};
	\draw(4.5,3.75) node{\(\tfrac{125}{\,169911\,}\)};
	\draw(20,3.75) node[left]{約\ $7.4$円};
	\draw(4.5,2.25) node{\(\tfrac{3250}{\,169911\,}\)};
	\draw(20,2.25) node[left]{約\ $19.1$円};
	\draw(20,0.75) node[left]{約\ $89.8$円};
	\draw(14,0.75) node[CUDRed]{期待値};
	}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{あなたはミニロトを買いますか？}
$1$口$200$円で期待値が$89.8$円では、割のよい賭け事とはいえない。\pause

\vskip5ex
\centerline{\LARGE あなたは夢を買いますか？}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{申込カード裏面}
\centerline{\includegraphics[width=14cm]{miniloto4.jpg}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\end{document}

\textcolor{CUDRed}{

