\documentclass[letterpaper,10pt]{article}
\usepackage{amssymb}
\usepackage{url}
% pagelayout
%header
%\setlength{\topmargin}{-0.5in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
%side margin
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
% text size
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9in}
% footer
\setlength{\footskip}{.25in}

% define the title
\title{Risk Exposure}
\begin{document}

\section*{Risk Exposure ($RE$)}
\begin{displaymath}
RE = RE_q + RE_m
\end{displaymath}
Defined in Huang08.

\subsection*{Software Quality Investment Risk Exposure ($RE_q$)}
\begin{displaymath}
RE_q = P_q(L) \cdot S_q(L)
\end{displaymath}

\subsubsection*{$P_q(L)$}

\begin{tabular}{llllll}
RELY & VL & L & N & H & VH\\
\hline
$P_q(L)$ & 1.0  & 0.475 & 0.24 & 0.125 & 0.06\\
\end{tabular}\\
Values are from From Huang08, page 101. \\
$P(L)$ is the probability of loss do to unacceptable quality.  
This value was calculated based on COCOMO estimate of delivered defect density (COQUALMO).
We define $P_q(L)$ as the ratio of defects versus defects with RELY set to VL.

\begin{displaymath}
P_q(L) = \frac{defects}{defects_{vl}}
\end{displaymath}

\subsubsection*{$S_q(L)$}
\begin{tabular}{lllllll}
RELY & VL & L & N & H & VH & \\
\hline
$S_q(L)$ & 0.33 & 0.19  & 0.11 & 0.06  & 0.03 & (Early Startup) \\
$S_q(L)$ & 1.0  & 0.56  & 0.32 & 0.18  & 0.10 & (Commercial) \\
$S_q(L)$ & 3.0  & 1.68  & 0.96 & 0.54  & 0.30 & (High Finance) \\
\end{tabular}
\\
Values from Huang08 page 102. \\
Each curve value of $S_q(L)$ is calculated on a Pareto distribution.  
Values match exponential distribution with $\alpha = 1.7766$ and $\beta = 0.574$ for $S_c(x) = \alpha e^{-\beta x}$
This will remain the same, however the base of the distribution will be guessed from a range of numbers.

Huang uses three versions of $S_q(L)$.  Each corresponding to different business cases.  Huang used a factor of
3 as a multiplier for each business case.  In our calculation, this multiple will be based on $CPLX$.  
This decision is based on the idea that a more sophisticated business case would create more complicated applications
which require more code.

The calculation for the coefficent is 
\begin{displaymath}
3^{\frac{cplx-3}{2}}
\end{displaymath}
This equation was chosen because the range of values is $[0.333 \quad 5.196]$ which is very close to the ranges used in Huang's paper.

Mentioned in Huang08 page 104, since default $S_q(L)$ is normalized, any cost factor can be added in for a particular evaluation.
To integrate with COCOMO II, $S_q(L)$ is multiplied with $PM$.

\begin{displaymath}
S_q(L) = 3^{\frac{cplx-3}{2}} \cdot PM \cdot S_c
\end{displaymath}

To add flexibility, we generalized the curve to be composite of multiple attributes.
lookupSizeOfLossCoefficient(x) is the function that does the look up on the Pareto curve for each attribute.
The rating/xomo values of each attribute is plugged into the Pareto curve.  For our simple design we will be using 
2 Pareto curves: one will be increasing with rating, the other will be decreasing with rating.  The decision of 
which curve to use is based on the relationship between the attribute and the value goal.

\begin{displaymath}
S_c = lookupSizeOfLossCoefficient(rely)
\end{displaymath}


\subsection*{Market Share Erosion Risk Exposure ($RE_m$)}
\begin{tabular}{llllll}
RELY & VL & L & N & H & VH \\
\hline
     & 0.008 & 0.027 & 0.09 & 0.3 & 1.0\\
\end{tabular}
\\
From Huang08 page 103.\\ 
On Huang08 page 102, it is said that these values were picked for simplicity.
In our version, the base of the exponential curve will be guessed from a range of numbers.  
Values match exponential distribution with $\alpha = 3.3499$ and $\beta = 1.2065$ for $M_c(x) = \alpha e^{-\beta (6-x)}$
Also, our version is more expandable to handle more attributes than RELY.

Mentioned in Huang08 page 104,  since default $RE_m$ is normalized, any cost factor can be added in for a particular evaluation.
To integrate with COCOMOII, $RE_m$ is multiplied with $PM$.

lookupMarkShareErosionCoefficient(x) acts the same as lookupSizeOfLossCoefficient(x), except an 
exponential curve is used instead of a Pareto.

\begin{displaymath}
RE_m = PM \cdot M_c
\end{displaymath}
\begin{displaymath}
M_c = lookupMarkShareErosionCoefficient(rely)
\end{displaymath}

\end{document}
