\documentclass[a4j]{jsarticle}
%\document...[a4j,eclepsf]{jarticle}
\usepackage{latexsym,amssymb,amsmath}
\usepackage[dviout]{graphicx,color}
\usepackage{verbatim}

\makeatletter
\newenvironment{indentverb}
  {\def\verbatim@processline{%
    \hspace*{4zw}\the\verbatim@line\par}%
   \verbatim}
  {\endverbatim}
\makeatother 
%\verb|\begin{quote}\begin{verbatim}|
%\begin{quote}
% \begin{verbatim}
%   abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
%   !"#$\%&`'()~\|/
% \end{verbatim}
%\end{quote}



\usepackage{wrapfig}
%2�i�ɕ����Đ}������R�}���h
% \rightfigure{�����ɕ��͂�����}{scale=0.4}{filename.eps}{�}�̃L���v�V����}
% \leftfigure{�����ɕ��͂�����}{scale=0.4}{filename.eps}{�}�̃L���v�V����}
%
% \rightfigure{
%   �����͐}�̍����ɂ��镶�͂ł��D
%   }{scale=0.4}{filename.eps}{�}�̃L���v�V����}
\newlength{\minitwocolumn}
\newcommand{\rightfigure}[4]{%
\setlength{\minitwocolumn}{0.5\textwidth}
\addtolength{\minitwocolumn}{-0.5\columnsep}%
\ \vspace*{-1\baselineskip}\\
\begin{minipage}[t]{\minitwocolumn}%
#1\end{minipage}%
\hspace{\columnsep}%
\begin{minipage}[t]{\minitwocolumn}%
\begin{center}
\ \vspace*{2mm}\\
\includegraphics[#2]{#3}\\
\refstepcounter{figure}
\vspace*{2mm}
�}\thefigure:~#4
\end{center}\end{minipage}\\%
\vspace*{-0.16\baselineskip}
}%%%%
% \leftfigure{
%   �����͐}�̉E���ɂ��镶�͂ł��D
%   }{scale=0.4}{filename.eps}{�}�̃L���v�V����}
\newcommand{\leftfigure}[4]{%
\begin{minipage}[t]{\minitwocolumn}
 \begin{center}
  \ \vspace*{2mm}\\
  \includegraphics[#2]{#3}\\
  \refstepcounter{figure}
  \vspace*{2mm}�}\thefigure:~#4
 \end{center}
\end{minipage}%
\hspace{\columnsep}%
\begin{minipage}[t]{\minitwocolumn}%
  #1%
\end{minipage}%
\vspace*{-0.16\baselineskip}
}%%%%%

%  ���������ς��Ƀe�L�X�g���͂ޘg
%   \begin{FRAME}
%     �g���̓��e
%   \end{FRAME}
\newenvironment{FRAME}{\begin{trivlist}\item[]
  \hrule
  \hbox to \linewidth\bgroup
    \advance\linewidth by -30pt
    \hsize=\linewidth
    \vrule\hfill
    \vbox\bgroup
      \vskip15pt
      \def\thempfootnote{\arabic{mpfootnote}}%foot note to arabic
      \begin{minipage}{\linewidth}}{%
      \end{minipage}\vskip15pt
    \egroup\hfill\vrule
  \egroup\hrule
\end{trivlist}}




\begin{document}
%\maketitle

\begin{center}
{\bf\LARGE2�����z�ƃJ�C2�敪�z,�|�A�\�����z \\
  --- Mathematica �ɂ��v���b�g����
}\qquad
%$\Box \, \Box \, \Box \, \Box \, \Box$ 
\\
\hfill
$\Box \, \Box \, \Box \, \Box \, \Box$
$\Box \, \Box \, \Box \, \Box \, \Box$
$\Box \, \Box \, \Box \, \Box \, \Box$
$\Box \, \Box \, \Box \, \Box \, \Box$
$\Box \, \Box \, \Box \, \Box \, \Box$
$\Box \, \Box \, \Box \, \Box \, \Box$
\hfill
\today ��
%
\end{center}
%
\tableofcontents
%
\section{2�����z}

\rightfigure{%���͏���
�����2�����z�� 
  \( Binom(n,p) = \left(8,\dfrac{3}{10}\right), 
   \left(8,\dfrac{5}{10}\right), 
   \left(8,\dfrac{8}{10}\right) \)
��3�ʂ�������Ă��܂��B

2�����z�̖��x�֐�
\[
   \displaystyle p(k) = \binom{n}{k} p^k (1-p)^{n-k},\, k=0,1,2,\cdots,n
\]
�񐔂�$n$�͓����l�ł����A$p$��3�ʂ�̒l�ɂ���āA������l��
�������ꍇ������($p=\frac{3}{10}$),
�Ώ̂̏ꍇ($p=\frac{5}{10}=\frac{1}{2}$),
�傫���ꍇ������($p=\frac{8}{10}$)
�ƂȂ��Ă��܂��B
%\begin{center}
%   \includegraphics[width=5.2cm, height=4.5cm]{binomial.eps}
%\end{center}

%\begin{quote}
%\begin{verbatim}
%abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
%!"#$\%&`'()~\|/
%\end{verbatim}
%\end{quote}
}%���͏I���A�T�C�Y�ƃt�@�C����
{scale=0.8}{binomial.eps}{2�����z}

\noindent
���3�̃O���t��Mathematica�ŕ`���R�}���h�G


\begin{FRAME}
\begin{quote}
\begin{indentverb}
ListPlot[Table[{k, 
   PDF[BinomialDistribution[8, p], k]}, 
   {p, {0.3, 0.5, 0.8}}, {k, 0, 8}], 
   PlotMarkers -> Automatic, Joined -> True, 
   PlotRange -> All]
\end{indentverb}
\end{quote}
\end{FRAME}

\% Mathematica �̖��߁F
\begin{itemize}
\item 2�����z�̖��x�֐��̒l�����߂� 
PDF[BinomialDistribution[n, p],k]   --> �p�����[�^$n,p$�̂Ƃ��A�l$k$��
�΂���m�����x
\item
$Table[expr,\{i,i_min,i_max.d_i\}]$:   $i$���J�n$i_min$����I��$i_max$�܂ŊԊu�ŕω����������X�g,
\item
$Plot[f,\{x,x_min,x_max \}]$: $f$���J�n$x_min$����I��$x_max$�܂�,
\item
$Plot[\{f_1,f_2\},\{x,x_min,x_max \}]$ : $f_1,f_2$���J�n$x_min$����I��$x_max$�܂�
\end{itemize}

\section{�J�C2�敪�z} % section 2

\rightfigure{%���͏���
����̓J�C2�敪�z�̃p�����[�^$\nu$��3�ʂ�̒l
\(
\nu = 10, 7, 5
\)
�ŕ`���Ă��܂��B
���̕��z��
\(
X \, \sim \, \chi(10),\chi(7),\chi(5)
\)
�ƕ\���A�m�����x�֐�(pdf) $f_X$ �͂��̂悤�Ȍ`�ŗ^�����܂��B
\[
   \displaystyle f_X(x) = \mbox{(const)} x^{{\nu}/2-1} \exp(-x/2), \, x>0
\]
$(const)$�Ƃ���̂́A�m�����x�֐��ƂȂ�悤�ϕ��l���P�ƂȂ邽�߂̒萔�ł��B
������$const = \dfrac{(1/2)^{\nu/2}}{\Gamma(\nu/2)}$�Ȃ�
�K���}�֐�$\Gamma(s),s>0$���������ĕ\���ł��܂��B���̂悤�Ȓ萔���ȗ����邽�߂�
���̋L��$\propto$��p���܂��B�����łȂ��̂ł������˘f�������邩���m��܂���B
\[
   \displaystyle f_X(x) \,\, \propto \, \, x^{{\nu}/2-1} \exp(-x/2), \, x>0
\]
}%���͏I���A�T�C�Y�ƃt�@�C����
{scale=0.8}{ChiSquare.eps}{�J�C�敪�z}




\noindent
���̃O���t��Mathematica�ŕ`���R�}���h�͈ȉ��̂悤�ɂȂ�܂��B
\begin{FRAME}
\begin{quote}
\begin{indentverb}
Plot[{PDF[ChiSquareDistribution[10], x], 
  PDF[ChiSquareDistribution[7], x], 
  PDF[ChiSquareDistribution[5], x]}, 
  {x, 0, 25}]
\end{indentverb}
\end{quote}
\end{FRAME}


\section{�|�A�\�����z}

\rightfigure{%���͏���
�|�A�\�����z�̃p�����[�^�A$\lambda=5, 7, 9, 11, 13$��ψ悪
$k=0,1,2,\cdots,20$ �܂ł������Ă��܂��B 
$\lambda=11,13$�ɂ��Ȃ�ƁA���񂾂񐳋K���z�ɋ߂��Ȃ邱�Ƃ�
������܂��B�|�A�\�����z�͐��K���z�ɑ����������܂��B
\[
   \displaystyle p(k) =  \dfrac{\lambda^k}{k!} e^{-\lambda}, 
   \, k=0,1,2,\cdots
\]
�K��$k!= k(k-1)\cdots 3\cdot 2 \cdots 1$, 
������$\Gamma(k+1) = k!$�ƂȂ��Ă���B

}%���͏I���A�T�C�Y�ƃt�@�C����
{scale=0.8}{Poisson.eps}{�|�A�\�����z}

�|�A�\�����z�͋H�Ȍ��ۂ��L�q����Ƃ��p�����܂����A���ɐ����Ƃ��Ă�
�s�v�c�Ȃ��̂�����Ă��܂��B�m���ߒ��ł͎w�����z�Ɏ��ԊԊu�Ő��N����
���𐔂��グ�邱�Ƃ��ł��܂��B����̓|�A�\���ߒ��Ƃ�΂�܂��B
�����A2�����z�ł̌�(�񐔁j$n$ ��傫�����A�m��$p$������������
�����Ƃ��A���Ȃ킿$p$���������̂ŋN�������ہi�H�Ȍ��ہj��
�L�q���邱�Ƃ��ł��܂��B


\vspace{5ex}
\begin{FRAME}
\begin{quote}
\begin{indentverb}
ListPlot[Table[
  {k, PDF[PoissonDistribution[l], k]}, 
  {l, 5, 13, 2}, {k, 0, 25}], 
  PlotMarkers -> Automatic, Joined -> True, 
  PlotRange -> All]
\end{indentverb}
\end{quote}
\end{FRAME}




\end{document}
\noindent
�����2�����z�� 
  \( Binom(n,p) = \left(8,\dfrac{3}{10}\right), 
   \left(8,\dfrac{5}{10}\right), 
   \left(8,\dfrac{8}{10}\right) \)
��3�ʂ�������Ă��܂��B
%���͋�s�Ȃ�
\begin{wrapfigure}{r}{0.5\textwidth}
 \includegraphics[width=5.2cm, height=4.5cm]{binomial.eps}
 \label{}
 \caption{}
\end{wrapfigure}

2�����z�̖��x�֐�
\[
   \displaystyle p(k) = \binom{n}{k} p^k (1-p)^{n-k},\, k=0,1,2,\cdots,n
\]
�񐔂�$n$�͓����l�ł����A$p$��3�ʂ�̒l�ɂ���āA������l��
�������ꍇ������($p=\frac{3}{10}$),
�Ώ̂̏ꍇ($p=\frac{5}{10}=\frac{1}{2}$),
�傫���ꍇ������($p=\frac{8}{10}$)
�ƂȂ��Ă��܂��B
%\begin{center}
%   \includegraphics[width=5.2cm, height=4.5cm]{binomial.eps}
%\end{center}

%\begin{quote}
%\begin{verbatim}
%abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
%!"#$\%&`'()~\|/
%\end{verbatim}
%\end{quote}

\noindent
���3�̃O���t��Mathematica�ŕ`���R�}���h�G

\vspace{10ex}

\begin{FRAME}
\begin{quote}
\begin{indentverb}
ListPlot[Table[{k, 
   PDF[BinomialDistribution[8, p], k]}, 
   {p, {0.3, 0.5, 0.8}}, {k, 0, 8}], 
   PlotMarkers -> Automatic, Joined -> True, 
   PlotRange -> All]
\end{indentverb}
\end{quote}
\end{FRAME}

%\end{document}

\begin{wrapfigure}{r}{0.5\textwidth}
   \includegraphics[width=5.2cm, height=4.5cm]{ChiSquare.eps}
   \label{} \caption{}
\end{wrapfigure}


\begin{center}
  \includegraphics[width=5cm, height=5cm]
    {Poisson.eps}
\end{center}

%% sample

\begin{wrapfigure}{r}{0.5\textwidth}
\begin{center}
\includegraphics[width=0.4\textwidth]{gradation_fig.eps}
\end{center}
\end{wrapfigure}


\begin{wrapfigure}{r}{0.5\textwidth}
   \includegraphics[width=5.5cm, height=4.5cm]{Poisson.eps}
   \label{} \caption{}
\end{wrapfigure}

���V�[�Y���̃^�C�K�[�X�́C���Ȃ��ꂻ���ł���D�Ƃ����̂́C�ē����Ȃ�{�C�ł���C�܂��O���l���������������{�̖싅�ɂ�������������ł���D�������C�����������c�_�́C���N�L�����v����V�[�Y�����n�܂�܂ł̃^�C�K�[�X�t�@���̈�̊y���݂ł���C���ې��т��������Ƃ͏��Ȃ��D�D�D�i���j

