TITLE: Evaluate $\int_0^{\frac{\pi}{4}}\frac{1+\cos x-x^{2}}{(1+x\sin x)\sqrt {1-x^{2}}}\,dx$
QUESTION [1 upvotes]: Find:
$$\int_0^{\frac{\pi}{4}}\frac{1+\cos x-x^{2}}{(1+x\sin x)\sqrt {1-x^{2}}}\,dx$$
I don't know how I starte & evaluate this integral
Wolfram alpha give $=1,28553$
My problem whene I use $t=\cos x$ I get $\arccos x$
Same problem with $t=\sin x$
If any one have idea please help me

REPLY [5 votes]: $$\mathcal{J}=\int_0^{\frac{\pi}{4}}\frac{1+\cos x-x^{2}}{(1+x\sin x)\sqrt {1-x^{2}}}\,dx=\int_0^{\frac{\pi}{4}} \color{red}{\frac{1+x\sin{x}}{\cos{x}\sqrt{1-x^2}}} \cdot \color{blue}{\frac{\cos{x} \left(1+\cos x-x^{2}\right)}{(1+x\sin x)^2}\,dx}$$
If $\displaystyle t=\frac{\sin{x}+x}{1+x\sin{x}} \text{ then }\color{blue}{dt=\frac{\cos{x}\left(1+\cos{x}-x^2\right)}{\left(1+x\sin{x}\right)^2} dx}$, and:
\begin{align*}
\color{red}{\frac{1+x\sin{x}}{\cos{x}\sqrt{1-x^2}}} &= \frac{1+x\sin{x}}{\sqrt{(1-\sin^2{x})(1-x^2)}}\\
&= \frac{1+x\sin{x}}{\sqrt{\left(1+x\sin{x}\right)^2-\left(\sin{x}+x\right)^2}}\\
&= \frac{1}{\sqrt{1-\left(\frac{\sin{x}+x}{1+x\sin{x}}\right)^2}} \\
&= \color{red}{\frac{1}{\sqrt{1-t^2}} }
\end{align*}
Putting this together,
\begin{align*}
\mathcal{J}&=\int_0^{\frac{\pi}{4}} \color{red}{\frac{1+x\sin{x}}{\cos{x}\sqrt{1-x^2}}} \cdot \color{blue}{\frac{\cos{x} \left(1+\cos x-x^{2}\right)}{(1+x\sin x)^2}\,dx} \\&=\int_0^{\frac{4+\pi \sqrt{2}}{\pi + 4\sqrt{2}}} \frac{dt}{\sqrt{1-t^2}}  \\
&= \color{green}{\boxed{\arcsin{\left(\frac{4+\pi \sqrt{2}}{\pi + 4\sqrt{2}}\right)}}}
\end{align*}


TITLE: Ways to find $\min[f(x)]$ where $f(x) = (x-1)(x-2)(x-3)(x-4)$ without using derivatives
QUESTION [3 upvotes]: As title states I need to:

Find $\min[f(x)]$ where $f(x) = (x-1)(x-2)(x-3)(x-4)$ without using derivatives

Since I i'm restricted to not use the derivatives I've started to play with the function in different ways. After some experiments I've noticed the following:
Let
$$
g(x) = (x-1)(x-3)
$$
and
$$
h(x) = (x-2)(x-4)
$$
Then i tried to find vertexes with $x_v = -{b \over 2a}$ and calculate values of $g(x)$ and $h(x)$ in $x_v$ points and they appear to be the minimum values for $f(x)$. I've also checked this for $p(x) = (x-1)(x-2)(x-5)(x-6)$ and a lot of other similar polynomials. All of them are symmetric with respect to some $x$.
Based on the above the $\min[f(x)] = -1$ and $\min[g(x)] = -4$ but I'm not sure why this worked. Could someone explain me what happened? I would
also appreciate if anyone could tell whether there exists a general way of finding minimum for even power polynomials of the following kind:
$$
\prod_{k=1}^{2n}(x-k)
$$

REPLY [9 votes]: Hint: You can exploit symmetry. Note the zeroes are equally spaced, so their center is $$\tfrac{1+2+3+4}{4}=\tfrac{10}{4}=\tfrac{5}{2}$$
This means you can write
$$f(x)=(x-\tfrac52-\tfrac32)(x-\tfrac52-\tfrac12)(x-\tfrac52+\tfrac12)(x-\tfrac52+\tfrac32)$$
$$=\left((x-\tfrac52)^2-(\tfrac32)^2\right)\left((x-\tfrac52)^2-(\tfrac12)^2\right)$$
$$=(z-\tfrac94)(z-\tfrac14)$$
where $z=(x-\tfrac52)^2$. Now you can find the $z_0 \geq 0$ which minimizes this polynomial using symmetry (vertex of the parabola). Then $f(z_0)$ is the desired quantity.


text:
\begin{document}
\maketitle
\begin{abstract}
	In the course of any statistical analysis, it is necessary to consider issues of data quality and model appropriateness. Value of information methods were initially put forward in the middle of the twentieth century in order to provide a framework for choosing between potential sources of information. However, since their genesis, value of information methods have been largely neglected by statisticians. In this paper we review and extend existing value of information methods and recommend the use of three quantities for identifying influential and outlying data: an influence measure previously suggested by \cite{kempthorne1986}, a related quantity known as the expected value of sample information that is used to gauge how much influence we would expect a portion of the data to have, and the ratio of these two quantities which serves as a comparison between observed influence and expected influence.

	We study the basic theoretical properties of those quantities and illustrate our proposed approach using two datasets. A data set containing employment rates and other economic factors in U.S. first presented by \cite{longley} is used to provide an example in the case of  linear regression. HIV surveillance data collected from prenatal clinics have been the main source of information for monitoring the HIV epidemic in low and middle income countries. A data set providing information about HIV prevalence in Swaziland is used as an example in the case of generalized linear mixed models.
\end{abstract}

\section{Introduction}
\label{sec:introduction}
In the course of any statistical analysis, it is necessary to consider issues of data quality and model appropriateness. To this end, it is helpful to be able to identify influential and outlying data. A portion of the data is said to be influential if its inclusion causes the fit of a model to substantially shift. When checking data quality, resources are often spent to check the quality of the most influential data as that data has the most impact on any decisions based on the model. A portion of the data is outlying if it is very distant from what would be predicted from the model using the rest of the data. Outlying data is important in checking data quality as it may indicate that a portion of the data is more likely to have quality issues. The presence of outlying data may also suggest that the model being used is inappropriate.

A Bayesian approach to statistical analysis will be used throughout this paper. Many approaches to identifying influential data in a Bayesian setting have been proposed. Early approaches measure the influence of a portion of the data using the Kullback--Leibler divergence between the posterior distributions calculated based on all of the data and the posterior distribution that results from excluding the portion of the data under consideration, see for example \cite{johnson1982} and \cite{pettit1985}. \cite{ali1990}, presents an approach to influence analysis based on the measure of average information suggested by \cite{lindley1956}.  \cite{weiss1992} propose a graphical statistic that is claimed to be useful for assessing all aspects of the influence of a single case on the posterior distribution.  \cite{weiss1996} suggests an approach to influence analysis that uses the combination of an influence statistic and an outlier statistic to assess the influence of a general perturbation to a model including the deletion of a data point. More Recently, there has been exploration of approaches based on geometrical considerations by \cite{kurtek2015}. While all of these methods use different influence measures, with the exception of the method propposed in \cite{weiss1992}, none of these methods go beyond simply identifying influential points.

\cite{kempthorne1986} puts forward three influence measures based on the change in expected utility that occurs when basing a decision on all of the data rather than excluding a portion of the data. Since this method was proposed, there has been some work in deriving particular forms for the suggested measure of influence for specific models, see \cite{arellanovalle2000}, \cite{vidal2007}, and \cite{vidal2010}. There is a striking similarity between the form of proposed influence statistics and the form of the measures used in value of information analysis which we will exploit in our proposed approach to influence analysis.

Value of information methods were initially put forward in the middle of the twentieth century during the development of statistical decision theory. value of information methods were designed to help in deciding if an experiment is worth conducting, choosing between different research regimes, and determining optimal sample size, see \cite{raiffa1961}. However, since their genesis, value of information methods have been largely neglected by statisticians. Value of information methods have, however, seen success in many applied settings. \cite{keisler2014} provide a good summary of the applied work that has been done using value of information methods. Most recently, there has been substantial interest in the applications of value of information methods to medical applications, see \cite{eckermann2017}, \cite{welton2014}, and \cite{brennan2017}. The scope of the application of value of information methods has changed little since it originated. It is the hope of the authors that our work might draw attention to applications of value of information methods to areas outside of their usual application to planning experiments.

\section{The Value of Information}
\label{sec:voi}

In decision theory, the goal is to choose the best action $a$ from a set of possible actions $\mathcal{A}$ called the action space. Typically, how good an action is depends on some unobserved parameter $\theta$ taking values in a parameter space $\Theta$.  We quantify how good or bad an action is using a loss function $$L(a, \theta) : \mathcal{A} \times \Theta \to \mathcal{R}$$ whose value depends on both the parameter $\theta$ and the action $a$. The larger the loss, the less  preferable the action.

We typically do not know the true value of $\theta$. So, we must choose the optimal action while taking into account the uncertainty about $\theta$. In the Bayesian setting, we may choose an action by minimizing the expected loss for an action conditional on all of the information that is available to us. The resulting choice is called the Bayes action for a decision problem. For instance, if we have not yet collected any data, then the Bayes action is the $a_0 \in \mathcal{A}$ that minimizes the prior risk $$R(a) = E \big \{ L(a,\theta) \big \} =  \int  L(a, \theta) d P (\theta).$$ After observing data $Y$, the Bayes action is the $a_Y$ that minimizes $$R(a \mid Y) = E \big \{ L(a,\theta) \mid Y \big \} = \int L(a, \theta) dP(\theta \mid Y)$$ where $P(\theta)$ is the prior distribution and $P(\theta \mid Y)$ is the posterior distribution. We shall use a similar notation when observing multiple observations (e.g. the Bayes action after observing two sets of observations $Y_1$ and $Y_2$ shall be denoted $a_{Y_1,Y_2}$).

The value of sample information provided by $Y$, denoted $\VSI(Y, \theta)$, is the reduction in loss that would occur if an action is based on both $Y$ and the prior information rather than just the prior information, $$\VSI(Y, \theta) = L(a_0, \theta) - L(a_Y, \theta).$$ Having already observed data $Y_1$, the partial value of sample information provided by additional data $Y_2$, denoted $\PVSI(Y_2 \mid Y_1; \theta)$ is the additional reduction in loss that occurs if the decision is chosen based on both $Y_1$ and $Y_2$ rather than just $Y_1$, $$\PVSI(Y_2 \mid Y_1; \theta) = L(a_{Y_1}, \theta) - L(a_{Y_1,Y_2}, \theta).$$

When choosing between different potential sources of information for the purpose of making a decision (possibly including the option of no additional information), we would ideally choose the source that would result in the largest surplus of value over the cost of obtaining that source. Unfortunately, the measures of this value $\VSI(Y, \theta)$ and $\PVSI(Y_2 \mid Y_1; \theta)$ both depend on the value of the unknown parameter $\theta$ and data which have not yet been observed. Choosing between data sources must therefore rely on estimates of their value rather than their actual value. The usual estimate of $\VSI(Y, \theta)$, the expected value of sample information, is obtained by taking an expectation with respect to $Y$ and $\theta$, $$E \big \{ \VSI(Y, \theta) \big \} = \int \VSI(Y, \theta) d P(Y, \theta).$$  The usual estimate for $\PVSI(Y_2 \mid Y_1; \theta)$ having already observed $Y_1$, the expected partial value of sample information for $Y_2$, is obtained by taking an expectation with respect to $Y_2$ and $\theta$ conditional on $Y_1$, $$ E \big \{ \PVSI(Y_2\mid Y_1 ; \theta) \mid Y_1 \big \} = \int \PVSI(Y_2 \mid Y_1 ; \theta) d P(Y_2, \theta \mid Y_1).$$ A potential data source is only thought to be worth obtaining if the expected value of sample information corresponding to the source is greater than its cost.

\section{Evaluating Influence Using Value of Information}
\label{sec:voiinfluence}

\cite{kempthorne1986} suggests using the expected increase in loss that would be incurred by incorrectly excluding a data point from an analysis as one measure of influence. Although this suggestion was meant for use in a linear regression setting as a way of measuring the influence of a single data point, the measure is generally applicable to any setting that can be formulated as a decision problem. For instance, if the data can be partitioned into two parts, $Y_1$ and $Y_2$, and one is interested in the influence of a portion of the data $Y_2$, then the suggested measure is
$$
E \big \{ L(a_{Y_1}, \theta) \mid Y_1, Y_2 \big \} - E \big \{ L(a_{Y_1, Y_2}, \theta) \mid Y_1, Y_2 \big \}.
$$
This measure can be rewritten in terms of the partial value of sample information of $Y_2$ given $Y_1$ as
$$
E \{ \PVSI(Y_2 \mid Y_1 ; \theta) \mid Y_1, Y_2 \} = E \big \{ L(a_{Y_1}, \theta)  - L(a_{Y_1, Y_2}, \theta) \mid Y_1, Y_2 \big \}.
$$
This provides an alternative interpretation of the Kempthorne measure: it is a retrospective estimate for the value of the additional information provided by $Y_2$. The law of total expectation relates this retrospective estimate to the prospective estimate that is typically used in value of information analysis as follows:
\begin{equation}
\label{Equation::proRetRel}
E \Big [ E\{\PVSI(Y_2 \mid Y_1 ; \theta) \mid Y_1, Y_2 \} \mid Y_1 \Big ] = E \big \{ \PVSI(Y_2 \mid Y_1 ; \theta) \mid Y_1 \big \}.
\end{equation}

To differentiate between these two estimates for $\PVSI(Y_2 \mid Y_1 ; \theta)$, we shall call $E\{\PVSI(Y_2 \mid Y_1 ; \theta) \mid Y_1, Y_2 \}$ the retrospective expected value of sample information and $ E \big \{ \PVSI(Y_2 \mid Y_1 ; \theta) \mid Y_1 \big \}$ the prospective expected value of sample information.

Using only the retrospective value of sample information, we can identify the points that have had the most influence on the decision under consideration, but the scale of this measure is not always clear. In particular, we cannot say if the influence of a portion of the data is larger than expected or if it is simply due to the amount of information that the data source brings. The prospective expected value of sample information, however, tells us how much influence we should expect a portion of the data to have on the decision. A natural comparison between the observed influence and the expected influence of a portion of data is the expected value of information ratio,
$$
\EVOIR(Y_2 \mid Y_1) = \frac{E\{\PVSI(Y_2 \mid Y_1 ; \theta) \mid Y_1, Y_2\}}{ E \big \{ \PVSI(Y_2 \mid Y_1 ; \theta) \mid Y_1 \big \}}
$$
A very coarse interpretation of this ratio is provided by the fact, following from equation \ref{Equation::proRetRel}, that
$$
E \big \{ \EVOIR(Y_2 \mid Y_1) \mid Y_1 \big \} = 1.
$$
Thus, a portion of the data with an expected value of information ratio greater than one is more influential than would have been expected based on the rest of the data.

Consider an estimation problem in which $\Theta = \mathcal{A} = \mathbb{R}^p$ and the loss function is
$$
L(a, \theta) = (a - \theta)^TQ(a-\theta)
$$
where $Q = A^TA \in \mathbb{R}^{p \times p}$ is positive definite. In this situation, the loss function is just the squared distance between an estimate and the true value of the parameter using the metric defined by $Q$. It is often easier to interpret $A$ than it is to interpret $Q$. $A$ can be thought of as a linear transformation of the parameter space into a space in which it is more appropriate to measure distances. For instance, when measuring prediction errors in linear regression, a design matrix $X$ can be be used to transform the coefficient vector $\beta$ into a vector of predicted values. In the case that $p=1$ this loss function is just a scaled version of a squared error loss function. The Bayes action given data $Y$ is $a_Y = E(\theta \mid Y)$, the posterior mean of $\theta$. If the data is partitioned into two parts $Y_1$ and $Y_2$, then the law of total expectation yields
$$
a_{Y_1} = E \big \{ E(\theta \mid Y_1 , Y_2) \mid Y_1 \big\} = E(a_{Y_1, Y_2} \mid Y_1 ).
$$
In this situation, the retrospective value of sample information is given in the following theorem:

\begin{theorem}
	\label{thm:retrospectiveForm}
	Let $Y_1$ and $Y_2$ be random objects taking values in $\Omega_1$ and $\Omega_2$ respectively. Let $\theta$ be a $p$-dimensional parameter with a possibly improper prior distribution. Suppose that $Y_1$, $Y_2$ are defined on the same sample space with distributions depending on $\theta$. Then, if $\mathcal{A} = \mathbb{R}^p$, $L(a, \theta) = (a - \theta)^TQ(a-\theta)$ where $Q = AA^T  \in \mathbb{R}^{p \times p}$ is positive definite, and the distributions of $\theta \mid Y_1$ and $\theta \mid Y_1, Y_2$ are proper with finite means:
	$$
	E \big \{\PVSI(Y_2 \mid Y_1; \theta)  \mid Y_1, Y_2 \big \} = (a_{Y_1} - a_{Y_1,Y_2})^T Q (a_{Y_1} - a_{Y_1,Y_2}).
	$$
\end{theorem}

Theorem \ref{thm:retrospectiveForm} tells us that the retrospective value of information that is used to measure influence of $Y_2$ is simply how far the estimate moved in the transformed parameter space by including $Y_2$ in the analysis in addition to $Y_1$. We also have the following result:
\begin{theorem} Under the assumptions of theorem \ref{thm:retrospectiveForm}, the prospective expected value of sample information is
	$$
	E \big \{ \PVSI(Y_2 \mid Y_1; \theta)  \mid Y_1 \big \} = tr\Big\{var \big ( A a_{Y_1,Y_2}  \mid Y_1 \big) \Big\}.
	$$
\end{theorem}

So, the expected influence of $Y_2$ given the rest of the data, or equivalently the expected squared distance between the two estimates made with and without $Y_2$, is the sum of the conditional variances of each component of the Bayes estimator after applying the transformation corresponding to $A$. We can  give a finer grained interpretation of the expected value of information ratio in some cases using the following fact:

\begin{theorem}
	\label{thm:evoir}
	Under the assumptions of theorem \ref{thm:retrospectiveForm} and the additional assumption that $a_{Y_1,Y_2} \mid Y_1 \sim N(a_{Y_1}, c Q^{-1})$ for some $c>0$,
	$$
	\EVOIR(Y_2 \mid Y_1)/p \sim \chi^2_p .
	$$
\end{theorem}

Theorem \ref{thm:evoir} allows us to see exactly how extreme the influence of a portion of the data is in terms of a probability. See the appendix for the derivations of these theorems.

By construction, the retrospective expected value of information is the product of the prospective value of information and the expected value of information ratio. Thus we have decomposed our measure of the influence of $Y_2$ on the decision into two components: the prospective expected value of information, which measures how far we would have expected the estimate to move by including $Y_2$ had we not observed it, and the expected value of information ratio which measures how much farther the estimate moved than we would have expected. An analogy exists between these measures and quantities used in frequentist influence analysis for linear regression, as we shall see in the next section.

\section{Linear Regression}
\label{sec:regression}
\subsection{Properties of Value of Information in Linear Regression}
Let $Y$ be an $n$-dimensional random vector such that
$$
Y \mid \beta, \sigma^2 \sim N\big( X \beta , \sigma^2 I_n \big),
$$
where $X$ is a $n \times p$ matrix, and $\beta$ is a $p$-dimensional vector, and $\sigma^2 \in \mathcal{R}$. We assume that we observe $Y$ and that $X$ is known, but that $\beta$ and $\sigma^2$ cannot be observed directly. We assign a noninformative prior distribution to $\beta$ and $\sigma^2$:
$$
\pi (\beta, \sigma^2) \propto \sigma^{-2}.
$$
For convenience we will write $Y_{1:k}$ to represent the first $k$ components of $Y$ and $X_{1:k}$ to be the matrix consisting of the first $k$ rows of $X$. However it should be understood that the following is applicable to any observation, not just the last. Then,
$$
\beta \mid \sigma^2, Y_{1:k} \sim N\Big\{\hat{\beta}_{k} , \sigma^2 \big( X^T_{1:k} X_{1:k}\big)^{-1} \Big\}, \quad \sigma^2 \mid Y_{1:k} \sim \chi^{-2} (k-p, S_{k}^2),
$$
where
$$
\hat{\beta}_k = \big( X^T_{1:k} X_{1:k}\big)^{-1} X_{1:k}^T Y_{1:k}
$$
is the maximum likelihood estimate for $\beta$ and
$$
S^2_k = \frac{1}{k-p} (Y_{1:k} - X_{1:k}\hat{\beta}_k)^T(Y_{1:k} - X_{1:k}\hat{\beta}_k)
$$
is the maximum likelihood estimate for the error variance. See for instance \cite{bda}. We will also make use of the symmetric hat matrix
$$
H = X (X^TX)^{-1} X^T
$$
with $i$th row/column $h_i$ and entries $h_{ij}$. Its diagonal entries $h_{ii}$ are known as the leverage of the $i$th observation and are given by
$$
h_{ii} = X_i (X^TX)^{-1} X_i^T.
$$

We are interested predicting the mean value of $Y_{new} \sim N(X_{new} \beta, \sigma^2)$. In this situation we would like to choose an action $a \in \mathcal{R}^p$ that minimizes $E(X_{new}a - X_{new}\beta)^2$. Unfortunately, this would require us to either specify a particular $X_{new}$ or specify a distribution $X_{new}$. Choosing a particular $X_{new}$ would be overly restrictive and in general we would rather not specify a particular form for the distribution of the independent variables in a linear regression setting. With this in mind, we will assume that $X_{new}$ comes from the empirical distribution of the rows of $X$. This suggests using the following loss function:
$$
L(a, \beta) = (Xa - X\beta )^T (Xa - X\beta ) = (a - \beta)^T X^TX (a - \beta).
$$
By construction, $X^TX$ is positive definite if the columns of $X$ are linearly independent. As is usual, we assume that this is the case. Then, the Bayes action based on $Y_{1:k}$ is $a_k = \hat{\beta}_{k} = E(\beta \mid Y_{1:k})$.

Consider the value of the last data point. The retrospective expected value of sample information may be obtained from theorem \ref{thm:retrospectiveForm} as follows:
$$
\begin{aligned}
E \big \{ \PVSI(Y_n \mid Y_{1:n}; \beta)  \mid Y_{1:n} \big \} &= (\hat{\beta}_n - \hat{\beta}_{n-1})^T X^TX (\hat{\beta}_n - \hat{\beta}_{n-1}) \\
&= (X\hat{\beta}_n - X\hat{\beta}_{n-1})^T(X\hat{\beta}_n - X\hat{\beta}_{n-1}) \\
&= \sum_{k = 1}^n (X_k\hat{\beta}_n - X_k\hat{\beta}_{n-1})^2.
\end{aligned}
$$

This estimate for the partial value of $Y_n$ is an unscaled version of the Cooks distance for the $n$th data point:

$$
\frac{\sum_{k = 1}^n (X_k\hat{\beta}_n - X_k\hat{\beta}_{n-1})^2}{pS_n^2}.
$$

Cook's distance is a common frequentist measure of influence in linear regression (\cite{cook1977}). Notice that the scaling factor is the same for all data points in the sample. So, we will draw the same conclusions about the relative influence or value of points using either the Cook's distance or the retrospective expected value of sample information.

The prospective expected value of sample information is shown in the appendix to be
$$
E \big \{ \PVSI(Y_n \mid Y_{1:n-1}; \theta)  \mid Y_{1:n-1} \big \} = \frac{n-p-1}{n-p-3} S_{n-1}^2 \frac{h_{nn}}{1 - h_{nn}}.
$$
The prospective expected value of sample information plays a role similar to the leverage in the frequentist setting in that both can be used to measure how influential we would expect an observation to be according to the model without observing the actual response. We see that the prospective expected value of sample information is an increasing function of the leverage, but also depends on the sample variance $S^2_{n-1}$. For a large sample size, $S^2_{-i}$, the estimate for $\sigma^2$ based on all the data but $Y_i$, will be similar for all $i$ and sorting the points according to their prospective value of sample information would give the same ordering of points as if we had sorted them by their leverage.

From the above we see that the expected value of information ratio is
$$
\begin{aligned}
\EVOIR(Y_n \mid Y_{1:n-1}) &= \frac{ \sum_{k = 1}^n (X_k\hat{\beta}_n - X_k\hat{\beta}_{n-1})^2}{\frac{n-p-1}{n-p-3} S_{n-1}^2 \frac{h_{nn}}{1 - h_{nn}}}\\
&=  \frac{(n-p-3) \frac{h_{nn}}{(1 - h_{nn})^2} (Y_n - X_n\hat{\beta}_n)^2 }{(n-p-1) S_{n-1}^2 \frac{h_{nn}}{1 - h_{nn}}}\\
&= \frac{(n-p-3)(Y_n - X_n\hat{\beta}_n)^2 }{(n-p-1) S_{n-1}^2 (1 - h_{nn})}\\
&=  \frac{(n-p-3) }{(n-p-1)}t_{(n)}^2.
\end{aligned}
$$
Here $t_{(n)}$ is the externally Studentized residual for the $n$th observation. The expected value of information ratio is therefore large when it is far from the line predicted by the other points as measured by the externally Studentized residual.

\subsection{Example: Longley Data}

\begin{figure}[htpb]
	\begin{center}
		\includegraphics[scale=1.25]{./figure2a.png}
		\caption{The value of information ratio plotted against the prospective expected value of sample information with contours indicating the retrospective expected value of sample information. Points that lie vertically higher indicate an observation that has influenced the model to a larger degree than would have been expected based on the rest of the data. Points that lie farther to the right correspond to observations that would be expected to have a larger influence. Finally, points that are closer to the top right of the plot correspond to more influential observations.
		}
		\label{fig:retrospectivevalue}
	\end{center}
\end{figure}

Initially Cook (1977) illustrated the use of Cook's distance by an application to a data set first presented in by \cite{longley}. This data set contains the number of people employed in the United States and six other economic variables recorded from 1947 to 1962. In his example, Cook fit an ordinary linear regression having only first order terms using the number of people employed as the response variable and all others as predictors. We shall take the same approach to illustrate how to interpret the measures discussed above.

We can learn a few things from figure \ref{fig:retrospectivevalue}. The observation made in 1951 has the largest influence on the fit of the model as measured by the retrospective value of sample information. The observation is more than two and half times as influential as would have been expected based on the rest of the data. This is even more notable as this observation was already expected to have a moderate impact on the model. The observation made in 1962 is the second most influential point. The plot indicates, however, that this influence is close to what would be expected according to the rest of the model. Thus, it is influential but not surprisingly so. The observation is within a reasonable distance of the line suggested by the other points. The observations made in 1956 and 1950 both have a much larger impact than would have been expected. Despite the high expected value of information ratio, the observations made in 1956 and 1950 are still substantially less influential than the observations made in 1951 and 1962. This is due to the two points having an especially low prospective value, a consequence of being low leverage points.

\section{Example: HIV Prevalence in Swaziland}
\label{sec:swaziland}

Swaziland is a small developing country in Africa with a high occurrence of HIV. The main source of data to inform estimates of HIV epidemics has been unlinked anonymous testing of pregnant women who attend antenatal clinics. Nearly all countries established antenatal clinics HIV surveillance in the early 1990s, making it the earliest and most consistently available source of information. Swaziland has relatively sparse antenatal clinics data, and thus it is important to ensure that those data properly contribute to the estimation of Swaziland HIV epidemic by detecting and investigating influential and outlying data.

For the purpose of estimating the prevalence of HIV in the country, patients at 17 different clinics were tested for the presence of HIV from 2002 to 2010 with data reported every two years. Swaziland is comprised of four districts: Hhohho, Lubombo, Manzini, and Shiselweni. Five of the sites being monitored were in the Lubombo region, while each of the three remaining districts contained only four of the monitored clinics. One clinic in the Lubombo region reported no data for a single year, but otherwise data exists for each clinic and period. We did not use the historical data before 2002 because they were not available at local level, and we did not use any epidemiology model in this analysis. Therefore, the result is only for the illustration of value of information approach, and should not be viewed as official HIV estimates for Swaziland.

Let $Y_{rst}$ be the number of individuals that test positive for HIV during the year $t$ at the $s$th site in the $r$th region. We assume that
$$
Y_{rst} \sim Binomial(N_{rst}, \pi_{rst})
$$
where $\pi_{rst}$ is the HIV prevalence at the $s$th site in the $r$th region in year $t$ and $N_{rst}$ is the number of individuals tested for HIV at the $s$th site in the $r$th region in year $t$. Furthermore, we also assume that
$$
\pi_{rst} = \frac{1}{1 + exp(-\eta_{rst})}, \quad \eta_{rst} = \mu + \alpha_r + f(t) + \gamma_s .
$$
The site effect is treated as a random effect with $\gamma_s \sim N(0, \tau^2)$, while the region effects $\alpha_r$ are fixed. The trend function $f(t)$ is approximated by a linear combination of cubic B-splines, giving rise to a vector $X(t) \in \mathbb{R}^3$ for each time point. That is, for some $\beta \in \mathbb{R}^3$,
$$
\eta_{rst} = \mu + \alpha_r + X(t)^T \beta + \gamma_s .\\
$$
We use assign weak independent prior distributions to the parameters:
$$
\begin{aligned}
\mu &\sim N(0, 100)  \\
\beta_i &\sim N(0, 100 ),\quad i = 1,\dots,3 \\
\alpha_r &\sim N(0,100),\quad r = 2,3,4 \\
\gamma_s &\sim N(0,\tau^2),\quad s = 1,\dots,17 \\
\tau^2 &\sim Gamma^{-1}(0.1, 0.1).
\end{aligned}
$$
We set $\alpha_1 = 0$ for identifiability purposes and each of the parameters is independent of the others in the prior distribution.

The main goal of the analysis of this data is to estimate the prevalence of HIV for each of the four regions for each of the years examined. It is true that even according to the above model, each region has various levels of HIV prevalence around each site. Thus we set the goal to be to estimate the median HIV prevalence of the sites for each region. That is, we wish to estimate
$$
\pi_{rt} = \frac{1}{1 + exp(-\eta_{rt})}, \quad \eta_{rt} = \mu + \alpha_r + X(t)^T \beta
$$
for each region and year. That is, we wish to estimate the matrix $\pi \in \mathbb{R}^{4 \times 5}$ whose entry in the $r$th row and $t$th column is $\pi_{rt}$. We shall employ a quadratic loss function:
$$
L(\hat{\pi}, \pi) = \sum \limits_{r }  \sum \limits_{t} (\hat{\pi}_{rt} - \pi_{rt})^2.
$$

\begin{figure}[htpb]
	\begin{center}
		\includegraphics[scale=1.5]{./swazi1.png}
		\caption{The fitted HIV prevalence curve for each region is shown as a bold black line with the bold dashed lines indicating pointwise $95\%$ credible intervals. The gray lines are the observed prevalence at each site. The FLAS Clinic, Vuvulane Clinic, and the King Sobhuza II PHU have prevalence indicated by dashed gray lines.}
		\label{fig:fitted}
	\end{center}
\end{figure}

\begin{figure}[htpb]
	\begin{center}
		\includegraphics[scale=1]{./swazi2.png}
		\caption{Expected value of information ratio plotted against the prospective value of sample information for each clinic. The plotted letter indicates the region to which the clinic belongs. The three clinics with the highest expected value of information ratios are labeled. The contours indicate the retrospective value of information. }
		\label{fig:influence}
	\end{center}
\end{figure}

Estimates for the HIV prevalence curves in each region are shown in Figure \ref{fig:fitted}. Also shown in Figure \ref{fig:fitted}, are the observed percentages of individuals that tested positive for HIV at each site. The HIV prevalence rates are fairly stable in 2000's as being observed in most clinics. The posterior medians are at similar level across four regions. Hhohho region estimates have a smaller uncertainty than other three regions because clinics in this region have similar trends.

To proceed, three quantities need to be computed for each site: the retrospective expected value of sample information, the prospective expected value of sample information, and the expected value of information ratio. For the parameter of interest, we first obtain a Monte Carlo sample from the posterior distribution conditional on all of the data, and then obtain a Monte Carlo sample for each site from the posterior distribution conditional on the data with that site removed. It results in the Monte Carlo samples of retrospective value of sample information for each site, which is the squared distance between the posterior means of $\pi$ conditional on the data with and without that site included. Repeating the above procedure many times, we could approximate the distribution of the retrospective value of sample information for each site. The retrospective value of sample information for a site is then approximated by the squared distance between the posterior means of $\pi$ conditional on the data with and without that site included.

Computing the prospective expected value of sample information for a site is more computationally intensive as we need to draw samples from the predictive distribution of the excluded site in order to calculate the partial value of sample information
of that site given the rest of data. Let $Y_{rs}$ be a $5$-dimensional vector of observations for the $s$th site in the $r$th region and $Y_{(-rs)}$ be the remaining data.  A naive Monte Carlo approach would proceed as follows:
\begin{enumerate}
\item Sample $(Y_{rs}^{(1)}, \pi^{(1)}), \dots, (Y_{rs}^{(N)}, \pi^{(N)})$ independently from the joint conditional distribution of $Y_{rs}, \pi \mid Y_{(-rs)}$ so that we have the complete data scenarios.

\item Approximate the expected prevalence conditional on the data with the $s$th site in the $r$th region removed,  $\pi_{ Y_{(-rs)}} = E \big \{\pi \mid Y_{(-rs)} \big \}$,  by
	$$
	\hat{\pi} =  \frac{1}{N} \sum  \limits^{N}_{k=1} \pi^{(k)}.
	$$

\item Draw posterior samples of prevalence conditional on the complete data generated in step 1. That is, for $k = 1, \dots, N$, sample  $\pi^{(k,1)}, \dots, \pi^{(k,M)}$ independently from the conditional distribution of $\pi \mid Y_{(-rs)}, Y_{rs}^{(k)}$.

\item Approximate the expected prevalence conditional on the generated complete data $\pi_{ Y_{(-rs)}, Y_{rs}^{(k)}} = E \big \{ \pi \mid Y_{(-rs)}, Y_{rs}^{(k)} \big \}$ by
	$$
	\hat{\pi}^{(k)} =   \frac{1}{M} \sum  \limits^{M}_{j=1} \pi^{(k,j)}.
	$$

\item Approximate the prospective expected value of sample information by
	$$
	E \big \{ \PVSI(Y_{rs} \mid Y_{(-rs)}; \pi)  \mid Y_1, Y_2 \big \} \approx \frac{1}{N}  \sum \limits_{k=1}^N  \sum \limits_{r}  \sum \limits_{t} (\hat{\pi}_{rt} - \hat{\pi}_{rt}^{(k)})^2.
	$$

\end{enumerate}
Since sampling from a posterior distribution is often computationally intensive and the number of samples required for a reasonable grows very fast as the dimension of the problem increases this approach typically will be not feasible. In order to avoid the inner level of sampling in step 3, we instead take an approach similar to that of \cite{strong2015} and revise step 3 and 4 of the previous procedure as follows:

\begin{enumerate}
		  \setcounter{enumi}{2}
\item Apply a non-linear regression procedure to the pairs generated in (1) in order to estimate $f\{ Y_{rs}^{(k)}\} = E  \big \{ \pi \mid  Y_{(-rs)}, Y_{rs}^{(k)} \big \}$.
\item Approximate $\pi_{ Y_{(-rs)}, Y_{rs}^{(k)}} = E \big \{ \pi \mid Y_{(-rs)}, Y_{rs}^{(k)} \big \}$ by using the fitted values $\hat{\pi}^{(k)} = \hat{f} \{ Y_{rs}^{(k)}\}$.
\end{enumerate}
We considered both a linear and a generalized additive model for the functional form of $E\{\pi \mid Y^{(k)}\}$ in step 3, but further inspection showed substantial deviations from these models. In the end, we used a $k$ nearest neighbor regression to approximate $E\{\pi \mid Y^{(k)}\}$.

Once the retrospective and prospective expected value of sample information are computed, calculating the expected value of sample information ratio is trivial. The high expected value of information ration for each of the sites labelled in Figure \ref{fig:influence} indicates that they were around twice as valuable as would have been expected before observing them. Each of the other sites were around as influential as would be expected or less influential than would have been expected. These clinics are shown as gray dotted lines in figure \ref{fig:fitted}. One of the clinics, the Vuvulane Clinic, deviates noticeably from the other sites in the Lubombo Region from 2002 to 2006. As indicated by the site's very low prospective value of sample information, the data from the Vuvulane Clinic would needed to deviate from expectations to a high degree to have a large impact on the model fit. The remaining two sites with a high expected value of information ratio, the FLAS Clinic and King Sobhuza II PHU, are substantially more influential than any of the other sites. Interestingly, both of these sites are in the Manzini. The other two sites from the Manzini region are no more influential than would be expected. One might note that there was one clinic in Shiselweni region, the Dwaleni clinic, that seems to show strong declining prevalence since 2004, but was not marked as influential. This may seem problematic at first, but can be understood by noting that this clinic had a total sample size of 238 while the average clinic sample size was about 695.

When choosing which sources of information to investigate for data quality purposes, we typically will base the decision on two criteria: how influential the data is and how unusual the data is. If a portion of the data has little to no effect on a decision, any problems with the data will also have little impact on the final decision. On the other hand, data that behaves as it is expected to is unlikely to raise any questions about data quality even if it is influential. Figure \ref{fig:influence} allows us to examine both of these criteria simultaneously. The three clinics labeled in red are likely to be of the highest priority when investigating data quality as the remaining clinics have, at most, a level of influence close to what would be expected ahead of time as indicated by having an expected value of information ratio close to or less than 1. The FLAS clinic in particular is simultaneously the most influential and most surprisingly influential of the data sources.

\section{Discussion}
\label{sec:discussion}

Many existing approaches to Bayesian influence analysis consist of plotting various measures of influence against the index of each observation (For instance, see \cite{kurtek2015}, \cite{vidal2010}, and \cite{zhu2011}).Generally, more insight into the data is granted by considering not just the raw influence of an observation, but also whether this influence is expected based on the rest of the data or if the observation is influence is due to how surprising the observed data is. Our apporach to Bayesian influence analysis is to plot all three value of information quantities simultaneously in order to visualize this relationship as illustrated in the Longley data and Swaziland HIV prevalence examples.

There do exist approaches to Bayesian influence analysis that do not reduce to considerations of a single number. These measures tend to focus on understanding the specific nature of the influence of a deleted case. Examples of such approaches include  \cite{weiss1992} and \cite{bradlow1997}. These approaches are not typically suited for identifying the most influential points or understanding how surprising the observed levels of influence are as they tend to require a separate plot for each portion of the data. Instead, these approaches aim at exploring the nature of the influence and in identifying specific ways an observation or set of observations influence the results of an analysis. As such, they should not be seen as alternatives to our proposal but complements that allow for further investigation about the nature of the influence that a portion of the data has had.

The primary drawback of the proposed approach lies in the computational difficulty in calculating the prospective expected value of sample information for each portion of the data under consideration. There has been recent work on addressing the computational difficulties that arise when attempting to calculate some of the quantities that are central to value of information methods, see  \cite{ades2004}, \cite{strong2015}, \cite{rabideau2018}, \cite{heath2017}, and \cite{yet2018}. Some level of meta-modeling is generally used in these approaches to compute the expected value of sample information in a reasonable amount of time as done in the section \ref{sec:swaziland}.

\section{Appendix 1: Properties of Proposed Measures Under Quadratic Loss Function}

Let $Y_1$ and $Y_2$ be random vectors of finite dimension. Let $\theta$ be a parameter that we are interested in estimating. We shall use a quadratic loss function to measure how good an estimate $a$ is:
$$
L(a, \theta) = (a - \theta) ^ T Q (a - \theta)
$$
where $Q = A^T A \in \mathbb{R}^{p \times p}$ is a positive definite matrix. We shall assume that the expectation of $\theta$ conditional on $Y_1$ and the expectation conditional on  $Y_1$ and $Y_2$ both exist and are finite. It is easy to show that the Bayes action in each case is the conditional mean of the parameter $\theta$,
$$
\begin{aligned}
a_{Y_1} &= E \big ( \theta \mid Y_1 \big ), & a_{Y_1, Y_2} &= E \big ( \theta \mid Y_1, Y_2 \big ).
\end{aligned}
$$
We shall make use of the fact that $E[a_{Y_1, Y_2} \mid Y_1] = a_{Y_1}$, a consequence of the law of total expectation. We may establish the expression for the retrospective expected value of sample information given by Theorem 1 as follows:
$$
\begin{aligned}
E \big \{ \PVSI(Y_2 \mid Y_1; \theta) \mid Y_1,Y_2 \big \} &= E \big \{ L(a_{Y_1}, \theta) - L(a_{Y_1,Y_2}, \theta)  \mid Y_1,Y_2  \big \}  \\
&= E \big \{ (a_{Y_1} - \theta)^TQ(a_{Y_1}-\theta) - (a_{Y_1, Y_2} - \theta)^TQ(a_{Y_1, Y_2}-\theta)   \mid Y_1,Y_2  \big \} \\
&= E \big ( a_{Y_1}^T Q a_{Y_1} - 2 a_{Y_1}^T Q \theta -  a_{Y_1, Y_2}^T Q a_{Y_1, Y_2} + 2 a_{Y_1, Y_2}^T Q \theta  \mid Y_1,Y_2  \big ) \\
&= a_{Y_1}^T Q a_{Y_1} - 2 a_{Y_1}^T Q  a_{Y_1, Y_2} -  a_{Y_1, Y_2}^T Q a_{Y_1, Y_2} + 2 a_{Y_1, Y_2}^T Q  a_{Y_1, Y_2} \\
&= a_{Y_1}^T Q a_{Y_1} - 2 a_{Y_1}^T Q  a_{Y_1, Y_2} + a_{Y_1, Y_2}^T Q  a_{Y_1, Y_2} \\
&= (a_{Y_1} - a_{Y_1,Y_2})^T Q (a_{Y_1} - a_{Y_1,Y_2}).
\end{aligned}
$$
The expression for the prospective expected value of sample information described by Theorem 2 can be demonstrated as follows:
$$
\begin{aligned}
E \big \{ \PVSI(Y_2 \mid Y_1; \theta) \mid Y_1 \big \} &= E \Big [ E \big \{ \PVSI(Y_2 \mid Y_1; \theta)  \mid Y_1,Y_2 \big \}  \mid Y_1 \Big ] \\
&= E \big \{ (a_{Y_1} - a_{Y_1,Y_2})^T Q (a_{Y_1} - a_{Y_1,Y_2})  \mid Y_1 \big \} \\
&= E \big \{  (A^Ta_{Y_1,Y_2} - A^Ta_{Y_1} )^T (A^Ta_{Y_1,Y_2} - A^Ta_{Y_1} )   \mid Y_1 \big \} \\
&= tr\Big \{ var(A^T a_{Y_1,Y_2} \mid Y_1  ) \Big\} \\
&= tr\Big \{ A^T var(a_{Y_1,Y_2} \mid Y_1  ) A \Big\}. \\
\end{aligned}
$$

Next we demonstrate Theorem 3. Suppose that $a_{Y_1,Y_2} \mid Y_1 \sim N(a_{Y_1}, \sigma^2 Q^{-1})$. Then,
$$
\begin{aligned}
\EVOIR(Y_2 \mid Y_1) &= (a_{Y_1} - a_{Y_1,Y_2})^T Q (a_{Y_1} - a_{Y_1,Y_2}) \\
&= (Aa_{Y_1} - Aa_{Y_1,Y_2})^T(Aa_{Y_1} - Aa_{Y_1,Y_2}) \\
&= \sigma^2 \frac{(Aa_{Y_1} - Aa_{Y_1,Y_2})^T}{\sigma}\frac{(Aa_{Y_1} - Aa_{Y_1,Y_2})}{\sigma}
\end{aligned}
$$
where $ Aa_{Y_1,Y_2} \sim N(Aa_{Y_1}, \sigma^2 I_p)$. It follows that
$$
\EVOIR(Y_2 \mid Y_1) \mid Y_1 \sim  \frac{\sigma^2}{p} \chi^2_p.
$$
It is useful to know the distribution of the expected value of information ratio as it allows one to measure exactly how often we should expect to see as large of an influence as we do. Generally we will not be able to establish an exact distribution for the expected value of information ratio and we are forced to use computationally intensive procedures to obtain this information. However, even when an analytical distribution is available it will sometimes be the case that $(5)$ and therefore $(6)$ hold approximately for some $Q$, as often happens in large sample settings.

\section{Appendix 2: The Prospective Expected Value of Sample Information in Linear Regression}
Here we derive the form of the prospective expected value of sample information for the model presented in section 4.1. We begin by applying theorem 2:
$$
\begin{aligned}
E \big \{ \PVSI(Y_n \mid Y_{1:n-1}; \theta)  \mid Y_{1:n-1} \big \} &= tr\Big\{X var \big ( \hat{\beta}_n \mid Y_{1:n-1} \big) X^T\Big\} \\
&= \sum_{k = 1}^n X_k var \big ( \hat{\beta}_n \mid Y_{1:n-1} \big) X^T_k  \\
&= \sum_{k = 1}^n X_k var \Big \{ (X^T X)^{-1}X^T Y \mid Y_{1:n-1} \Big \} X^T_k  \\
&=  \sum_{k = 1}^n X_k (X^T X)^{-1}X^T var (Y \mid Y_{1:n-1}) X (X^T X)^{-1}X_k^T \\
&=  \sum_{k = 1}^n X_k (X^T X)^{-1}X_n^T var (Y_n \mid Y_{1:n-1}) X_n (X^T X)^{-1}X_k^T \\
&= \sum_{k = 1}^n h^2_{nk}  var (Y_n \mid Y_{1:n-1})\\
&= h_{nn}  var (Y_n \mid Y_{1:n-1}).
\end{aligned}
$$
The last equality follows from the idempotence of the hat matrix $H$. The predictive variance for the $n$th observation is
$$
\begin{aligned}
var(Y_n \mid Y_{1:n-1}) &= \frac{n-p-1}{n-p-3} S_{n-1}^2 \{1 + X_n(X^T_{1:n-1}X_{1:n-1})^{-1}X_n^T\}.
\end{aligned}
$$
So,
$$
\begin{aligned}
E \big \{ \PVSI(Y_n \mid Y_{1:n-1}; \theta)  \mid Y_{1:n-1} \big \}  &= h_{nn} \frac{n-p-1}{n-p-3} S_{n-1}^2 \{1 + X_n(X^T_{1:n-1}X_{1:n-1})^{-1}X_n^T\} .
\end{aligned}
$$
However, an application of the Sherman--Morrison--Woodbury formula gives
$$
\begin{aligned}
(X_{1:n-1}^T X_{1:n-1})^{-1} &= (X^TX - X_n^T X_n)^{-1} \\
&= (X^TX)^{-1} + \frac{(X^TX)^{-1} X_n^T X_n (X^TX)^{-1}}{1 - X_n(X^TX)^{-1} X_n^T}.
\end{aligned}
$$
Thus,
$$
\begin{aligned}
X_n(X^T_{1:n-1}X_{1:n-1})^{-1}X_n^T &=  X_n(X^TX)^{-1}X_n^T + \frac{X_n(X^TX)^{-1} X_n^T X_n (X^TX)^{-1}X_n^T}{1 - X_n(X^TX)^{-1} X_n^T}\\
&= h_{nn} +  \frac{ h_{nn}^2}{1 -  h_{nn}}\\
&=  \frac{ h_{nn}}{1 -  h_{nn}}.
\end{aligned}
$$
So, the form of the prospective expected value of sample information is,
$$
\begin{aligned}
E \big \{ \PVSI(Y_n \mid Y_{1:n-1}; \theta)  \mid Y_{1:n-1} \big \} & = h_{nn} \frac{n-p-1}{n-p-3} S_{n-1}^2 \{1 + X_n(X^T_{1:n-1}X_{1:n-1})^{-1}X_n^T\} \\
& = h_{nn} \frac{n-p-1}{n-p-3} S_{n-1}^2 \frac{1}{1 - h_{nn}}                      \\
& = \frac{n-p-1}{n-p-3} S_{n-1}^2 \frac{h_{nn}}{1 - h_{nn}}.
\end{aligned}
$$

\pagebreak
\section{Appendix 3: Table of value of information Measures for Longley Data}

\begin{table}[H]
	\centering
	\begin{tabular}{ccccc}
		Year & Cook's D     & Retrospective EVSI & Prospective EVSI &  $\EVOIR$ \\
		\hline
		1947 & 0.141 & 0.092                & 0.088 &1.05        \\
		1948 & 0.041 & 0.026                &  0.177 &0.15     \\
		1949 & 0.003 & 0.002                & 0.079& 0.02     \\
		1950 & 0.244 & 0.159                & 0.056& 2.83     \\
		1951 & 0.614 & 0.399                & 0.157& 2.55     \\
		1952 & 0.089 & 0.058                &  0.072& 0.80     \\
		1953 & 0.079 & 0.051                & 0.126& 0.41       \\
		1954 & 0.001 & 0.000                & 0.142 & 0.00    \\
		1955 & 0.000 & 0.000                &  0.117& 0.00   \\
		1956 & 0.235 & 0.153                & 0.043& 3.53   \\
		1957 & 0.000 & 0.000                & 0.078& 0.00      \\
		1958 & 0.004 & 0.002                & 0.130& 0.02      \\
		1959 & 0.036 & 0.023                & 0.080& 0.29       \\
		1960 & 0.004 & 0.003                &  0.041& 0.07      \\
		1961 & 0.170 & 0.111                & 0.064&1.72     \\
		1962 & 0.467 & 0.304                & 0.258 & 1.18
	\end{tabular}
	\label{tab:longleyVOI}
\end{table}

\section{Appendix 4: Table of Value of Information Measures for Swaziland Example}
\begin{table}[H]
	\centering
	\begin{tabular}{llccc}
		Clinic  & Region     & Prospective EVSI & Retrospective EVSI &  $\EVOIR$ \\
		\hline
		Mbabane       &   Hhohho    & 0.0015 & 0.0007 & 0.44 \\
		Piggs Peak      &   Hhohho    & 0.0012 & 0.0012 & 1.03  \\
		Mkhuzweni HC     &   Hhohho    & 0.0015 & 0.0014 & 0.92 \\
		Dvokolwako      &   Hhohho    & 0.0014 & 0.0008 & 0.57 \\
		King Sobhuza II PHU &  Manzini    & 0.0013 & 0.0023 & 1.69 \\
		FLAS Clinic     &  Manzini    & 0.0012 & 0.0029 & 2.40 \\
		Mankayane HC     &  Manzini    & 0.0015 & 0.0002 & 0.16 \\
		Luyengo Clinic    &  Manzini    & 0.0014 & 0.0007 & 0.45 \\
		Hlathikhulu PHU   & Shiselweni  & 0.0015 & 0.0002 & 0.14 \\
		Nhlangano HC     & Shiselweni  & 0.0016 & 0.0006 & 0.38 \\
		Matsanjeni HC    & Shiselweni  & 0.0015 & 0.0001 & 0.06 \\
		Dwaleni Clinic    & Shiselweni  & 0.0011 & 0.0001 & 0.07 \\
		Siteki PHU      &  Lubombo    & 0.0009  & 0.0001 & 0.11 \\
		Lomahasha Clinic   &  Lubombo    & 0.0010 & 0.0001 & 0.13 \\
		Sithobela HC     &  Lubombo    & 0.0008 & 0.0008  & 0.96  \\
		Ndevane Clinic    &  Lubombo    & 0.0010  & 0.0001 & 0.10 \\
		Vuvulane Clinic   &  Lubombo    & 0.0007 & 0.0016 & 2.31
	\end{tabular}
	\label{tab:SwazilandVOI}
\end{table}

Both the prospective and the retrospective expected value of sample information have a Monte Carlo standard error of less than .0001 for each site.

\bibliography{citations}

\end{document}

config: arxiv


TITLE: singular point of a complete intersection surface
QUESTION [2 upvotes]: Let $S:= H_1\bigcap H_2\bigcap \cdots \bigcap H_N \subset\mathbb{P} _{\mathbb{C}}^{N+2}$ be a complete intersection surface, where each $H_i$ is a hypersurface defined by a homogeneous equation $f_i$.
If $x\in S$ is a singular point of $H_i$ for some $i$, then $x$ is a singular point of $S$.
My question is: Is it possible that there is a point $x\in S$ such that each $H_i$ is smooth at $x$ and $S$ is singular at $x$?
Can you give a reason for your answer?

REPLY [4 votes]: this is not a research level question.  a point on an intersection is singular if either it is singular on some one of the intersecting varieties or if those varieties are tangent at some point.


TITLE: General Componendo and Dividendo rule.
QUESTION [1 upvotes]: I have a book that states in the footnotes

$$\frac{a_1}{b_1} = \frac{a_2}{b_2} = ... =\frac{a_n}{b_n}= \lambda \implies \frac{\sum\lambda_ia_i}{\sum \lambda_ib_i} = \lambda $$
  for any $\lambda_i$.

I can prove the "usual" rule given this name. (the first one that comes up when googling it.)
But I can not seem to show this.
If I proceed as follows, in the case n = 2
$$\frac{a_1}{b_1} = \frac{a_2}{b_2} = \lambda$$
$$\implies 2\frac{a_1}{b_1} = \frac{a_2}{b_2} + \frac{a_1}{b_1}= \lambda+\frac{a_1}{b_1} $$
$$\implies \frac{b_1a_2+b_2a_1}{b_2b_1+\lambda^{-1}a_1b_2} = \lambda$$
but these are very specific coefficients!
I have a feeling like this is going to be an inductive argument,so I think it would be sufficient to understand the case n = 2, as it will be used to complete the inductive phase.

REPLY [1 votes]: $(a_i,b_i)$ are solutions of $\, L(a,b) =  (1,-\lambda)\cdot (a,b) = a-b\lambda = 0.\,$ Since $\,L\,$ is linear, the solutions form a vector space $V$, i.e solutions are closed under addition and scalings, therefore $$\,(a_i,b_i)\in V\ \Rightarrow\ \sum_i \lambda_i (a_i,b_i)\, =\, \left(\sum_i \lambda_i  a_i,\, \sum_i \lambda_i b_i\right ) \in V$$


TITLE: Can a homogeneous space be a manifold with boundary?
QUESTION [2 upvotes]: Let $M$ be a smooth manifold (a topological manifold with a smooth structure) endowed with a transitive smooth action by a Lie group $G$. Can $M$ be a manifold with boundary, or necessarily without boundary?

Work/Confusions:
In a topological manifold $M$ (possibly with boundary), each point $p \in M$ must have an open neighborhood $p \in U$ which is homeomorphic either to an open set in $\mathbb{R}^n$ or to an open set in $\mathbb{H}^n := \{ (x^1, \dots, x^n) \in \mathbb{R}^n \mid x^n \geq 0 \}$. The set $\partial \mathbb{H}^n := \{ (x^1, \ldots, x^{n-1}, 0) \mid x^1, \dots, x^{n-1} \in \mathbb{R} \}$ is called the boundary of $\mathbb{H}$.
If $p\in M$ is in the domain of a chart that is a hormeomorphism to an open subset of  $\mathbb{R}^n$, then $p$ is said to be an interior point, and if it is a domain of a boundary chart (a map $\phi\colon M\supset U\to \mathbb{R}^n$ such that $\phi(U)$ is an open subset of $\mathbb{R}^n$ and $\phi(U)\cap\partial\mathbb{H}^n\neq\emptyset$, where $U\subset M$ is an open subset).
Each point of $M$ is either a boundary point or an interior point, but not both.
$G$ as a manifold cannot have a boundary: every point is interior. Indeed, $G$ is a topological group, and thus the inversion and multiplications by $G$ on $G$ themselves are homeomorphisms from $G$ to itself. (reading Can a Lie group be a manifold with boundary?)
But if an action $\phi \colon G\times M \to M$ is continuous, then each map $\phi_g \colon M\to M$ is a homeomorphism of $M$ ($\phi_g$ is just $\phi_g(x)=gx$).
Now, $G$ actis on $M$ transitively. So if one point is in the interior, then every point is? But at least one point must be an interior point because otherwise all the points are on the boundary and we have $n-1$-dimensional (as opposed to $n$) manifold? So every point must be the interior?
Also, $M$ can be identified with $G/G_p$, where $G_p=\{g\in G\mid gp=p \}$ with an arbitrary $p\in M$. [J. M. Lee, smooth manifolds, Theorem 21.18 (Homogeneous Space Characterization Theorem).]
But I have heard when $G$ and $M$ are just topological spaces and the action $G\times M\to M$ is continuous, $G/G_p$ and $M$ are not necessarily homeomorphic under the quotient topology, so we need more structure in $G$ or $M$?

REPLY [7 votes]: Being a boundary point of a manifold can be characterised purely topologically (in terms of local homology groups say). So for each group
element $g$ as $x\mapsto gx$ is a homeomorphism of $M$ to itself, then $gx$
is a boundary point iff $x$ is. As $G$ is transitive, then either all
points of $M$ are boundary points or none are. They can't all be
boundary points.


TITLE: Limit the maximum value of the composition of an integer
QUESTION [1 upvotes]: I was doing a coding test (already finished, so no cheating for me) and came across this problem, which I'll describe in few steps:

We have a keypad, like on cellphones, with keys from 1 to 9, where 1 is the space key (" ")

We are given a message to convert to numbers based on the "distance" of each letter (P = 7, S = 7777, K = 55, ...), for example DRSA becomes 377777772
Now we need to calculate the the number of the possible messages we could write with that same number (DPPPPPPPA, DPPPPPQA, ...)

The method I came up with is the following:

I split the number by its different digits obtaining for example 3, 7777777, 2
I ignored single digits as they do not add "value" to the permutations (as far as I understood it)
I take each section of digits and based on its length (in this case 7 digits) I calculate every possible permutation and count them

Now this method works, but it's slow so I wanted to find a way to calculate the number of these permutations without counting them manually.
I found out about integer compositions, which in my case should have a maximum value. In this case the key 7 has a maximum value of 4 so its composition would be something like this:

4+3
3+4
4+1+2
4+2+1
1+2+4
1+4+2
...

How can I limit the maximum value of the composition (4) of a number (7)? How can I know the number of elements in it?

REPLY [0 votes]: How can I know the number of elements in it?

Two-variable recurrence. If $a_m(n, k)$ is the number of compositions of $k$ numbers from $1$ to $m$ which total $n$ then $$a_m(n, k) = \begin{cases}
0 & \textrm{if } n < 0 \\
1 & \textrm{if } n=0, k=0 \\
0 & \textrm{if } n=0, k \neq 0 \\
\sum_{i=1}^m a_m(n-i, k-1) & \textrm{otherwise}
\end{cases}$$
For practical computation, you would want to use dynamic programming.


TITLE: Direction of propagating wave in quantum barrier
QUESTION [0 upvotes]: Consider a step potential $V(x)$ where
  \begin{align}
V(x) & = 0; \quad x\leq 0 \\
V(x) & = V_0; \quad x> 0
\end{align}
  Now consider the case where $E_0<V_0$. The solutions of the time independent Schrodinger equation are:
  \begin{align}
\psi_L(x) & = A e^{i\theta x} + B e^{-i\theta x} \\
\psi_R(x) & = C e^{K x} + D e^{-K x}
\end{align}

I understand that for $x > 0$, the amplitude $C =0$ as when $x \to\infty$ then the wavefunction goes to zero.
However for $x \leq 0$, the wavefunction as I understand it is made up of an incident and reflected wave. I am confused how to understand which one is the incident and which is reflected.
Any help would be appreciated.
EDIT:

Here is an extract from my notes which clarify that $$ A e^{i\theta x}$$ term is the one which is the incoming wave but i am still unsure why this is the case

REPLY [3 votes]: It is not possible to tell in which direction the waves are moving without looking at the time dependence. According to the Schrodinger equation the time dependence of $\Psi_L$ is given by:
$$\Psi_L= A e^{i(\theta x - \omega t)} +B e^{i(-\theta x - \omega t)},$$
with $\omega = \frac{\hbar \theta^2}{2m}$. To see how the first term behaves, set B to $0$. We are left with a function which at $t=0$ has a constant modulus and a phase that varies in space. Pick your favorite point on this curve, e.g., $\Psi_L=A$ and analyze how the $x$ value for which $\Psi_L=A$ moves as we increase t.
For $t=0$ we obtain $\Psi_L=A$ when $x=0$ (there are many other solutions which we ignore). As $t$ increases, the $x$ value for which $\Psi_L=1$ increases:
$$\Psi_{L,B=0}=A$$
$$ A e^{i(\theta x - \omega t)} =A $$
$$ \theta x - \omega t = 0 $$
$$ x_{\Psi_L=A} = \frac{\omega}{\theta} t$$
We see that the point for which $\Psi_L=A$ moves to the right as time progresses. It does so with a velocity $v=\frac{\omega}{\theta}$ We might have chosen any other point and would have obtained the same velocity. This is why we say the wave travels to the right.
For the second term of $\Psi_L$, a similar analysis will show a left moving wave.
In general any function $f(ax+bt)$, with $a$ and $b$ real and positive, describes a left moving function, while any function $f(ax-bt)$ describes a right moving function.


TITLE: Generating functions - combinatorics problem of Mirko couting vehicles through the toll
QUESTION [1 upvotes]: Through the toll plaza vehicles pass each other. Mirko keeps a record order of passing vehicles according to the following types: motorcycle, bus and truck. How many possible sequence of passage of vehicles through the toll on a given day if it is known that there were 250 vehicles, motorcycles were even numbers,  buses odd and trucks were exactly 5 and no two trucks were not adjacent?
My work:
I try first solve problem without no two trucks were not adjacent.
Idea is to use generating function.
$$(1+x^2+x^4+...)*(x^1+x^3+...)*x^5$$ and we are looking for the coefficient $<x^{250}>$. If we rewrite a little ...
$$(1+x^2+x^4+...)^2$$ and we are looking for the coefficient $<x^{244}>$.
$$\frac{1}{(1-x^2)^2}=(1-x^2)^{-2}$$
We know $$-2+122-1\choose{2}$$$$=<x^{244}>.$$
What about the othere part of task?

REPLY [1 votes]: Here           is    an answer based upon  generating functions. We can reformulate the problem as follows.

We encode (m)otorcycles, (b)usses and (t)rucks by their initial character and consider the alphabet
  \begin{align*}
V=\{m,b,t\}
\end{align*}
  We are looking for  the  number of words built from $V$ of length $250$ which contain an even number   of $m$'s, and odd number of $b$'s and $5$ $t$'s.

In order to  obtain a generating function which respects that no two consecutive $t$'s occur, we consider Smirnov words built from $V$. These are words with no consecutive equal letters at all. See e.g. example III.24 in  Analytic Combinatorics by P. Flajolet and R. Sedgewick. So,
\begin{align*}
mtbmtmtmbtbt
\end{align*}
is a  Smirnov word,  while $mmt$ is not  a  Smirnov  word.

According to the referred section in the book we know the Smirnov words of a three letter alphabet $V$ are represented by a generating function $S(m,b,t)$ with
  \begin{align*}
S(m,b,t)=\left(1-\frac{m}{1+m}-\frac{b}{1+b}-\frac{t}{1+t}\right)^{-1}\tag{1}
\end{align*}
The idea  is, to take all Smirnov words and replace each $m$ with one or more $m$'s, each $b$ with one or more $b$'s. Then, in order to find the wanted number of words, we extract the coefficient of $t^5$.

Replacing $m$ with one or more $m$'s means to substitute
\begin{align*}
m\rightarrow m+m^2+m^3+\cdots=\frac{m}{1-m}
\end{align*}
and the same holds for $b$. We also need later to count the number of $m$'s and $b$'s and so we tag them with $z$.

We consider the generating function
  \begin{align*}
S\left(\frac{mz}{1-mz},\frac{bz}{1-bz},t\right)
&=\left(1-\frac{\frac{mz}{1-mz}}{1+\frac{mz}{1-mz}}-\frac{\frac{bz}{1-bz}}{1+\frac{bz}{1-bz}}-\frac{t}{1+t}\right)^{-1}\\
&=\left(1-(b+m)z-\frac{t}{1+t}\right)^{-1}
\end{align*}
We use the coefficient of operator $[t^n]$ to denote the coefficient of $t^n$ in a series and obtain with some help of Wolfram Alpha
  \begin{align*}
[t^5]S\left(\frac{mz}{1-mz},\frac{bz}{1-bz},t\right)&=[t^5]\left(1-(b+m)z-\frac{t}{1+t}\right)^{-1}\\
&=\frac{(b+m)^4z^4}{(1-(b+m)z)^6}
\end{align*}
  Since we want to find the number of words of length $250$ and $5$ characters were already used for $t^5$ we obtain
  \begin{align*}
[z^{245}]\frac{(b+m)^4z^4}{(1-(b+m)z)^6}&=(b+m)^4[z^{241}]\frac{1}{(1-(b+m)z)^6}\tag{2}\\
&=(b+m)^4[z^{241}]\sum_{j=0}^\infty\binom{-6}{j}(b+m)^j(-z)^j\tag{3}\\
&=(b+m)^4[z^{241}]\sum_{j=0}^\infty\binom{j+5}{j}(b+m)^jz^j\tag{4}\\
&=(b+m)^4\binom{246}{241}(b+m)^{241}\tag{5}\\
&=(b+m)^{245}\binom{246}{5}\tag{6}\\
\end{align*}
From (6) we finally conclude the number of all words without restriction to parity of $b$ or $m$ is $2^{245}\binom{246}{5}$ and since we are looking for words with even $b$ only we get due to symmetry the answer
  \begin{align*}
2^{244}\binom{246}{5}
\end{align*}

Comment:

In (2) we apply the linearity of the coefficient of operator and use the rule $$[z^p]z^qA(z)=[z^{p-q}]A(z)$$
In (3) we use the binomial series expansion.
In (4) we use the binomial identity $$\binom{-p}{q}=\binom{p+q-1}{q}(-1)^q$$
In (5) we select the coefficient of $z^{241}$.