Coverage for confidence intervals I would like to know if my simulation approach to find the coverage for a confidence interval of a prediction $\boldsymbol{\beta}^T\boldsymbol{X}_N$ is correct

*

*I generated a dataset of $n$ samples of covariates $\boldsymbol{X} \in \mathbb{R}^p$ and $Y \in \mathbb{R}$ that follow the linear model $Y_i = \boldsymbol{\beta}^T\boldsymbol{X}_i + \varepsilon_i$ for $i=1,\dots,n$. So I have a design matrix $\mathbb{X} \in \mathbb{R}^{n \times p}$ and a response vector $\mathbb{Y} \in \mathbb{R}^{n}$. Here I set $n = 512$ and $p = 1024$. (the data were generated as a multivariate standar normal)

*I created a new independent observation $\boldsymbol{X}_N \in \mathbb{R}^p$, $\boldsymbol{X}_N \sim N(0,I_p)$

*Compute $\widehat{\boldsymbol{\beta}} \in \mathbb{R}^p$ for the linear model

*Find the true value of $\boldsymbol{\beta}^T\boldsymbol{X}_N$ (since I can compute the true parameter $\boldsymbol{\beta}$)

*Compute an estimator of the variance $\hat{V} = \text{var}(\widehat{\boldsymbol{\beta}}^T\boldsymbol{X}_N)$

*Compute the confidence interval for $\boldsymbol{\beta}^T\boldsymbol{X}_N$ as $(\widehat{\boldsymbol{\beta}}^T\boldsymbol{X}_N \pm z_{\alpha/2}\hat{V}^{1/2})$ assuming asymptotic normality.

Now I'm not sure how to proceed. Should I repeat the process from (3) or generate another dataset? Any help would be much appreciated.
Edit: I'm interested in the behavior of $\widehat{\boldsymbol{\beta}}^T\boldsymbol{X}_N$ since this is a univariate term. The new observation $\boldsymbol{X}_N$ is fixed once is generated. So yes, I should say prediction inverval, but the rest of the question remains.

Typically one would be interested in the confidence interval $(\widehat{\boldsymbol{\beta}}^T_n\boldsymbol{x}_i \pm z_{\alpha/2}\hat{\text{se}}_n)$, a set of plausible values for the unknown fixed true ${\boldsymbol{\beta}}^T\boldsymbol{x}_i$, where $\hat{\text{se}}_n$ is the estimated standard error of $\widehat{\boldsymbol{\beta}}^T_n\boldsymbol{x}_i$ based on a sample of size $n$.
If this is not what you are interested in, perhaps you are interested in predicting the estimated mean resulting from a future experiment using your current sample of size $n$.  Using your notation $N$ for the future sample size, this prediction interval would take the form
$$(\widehat{\boldsymbol{\beta}}^T_n\boldsymbol{x}_i \pm z_{\alpha/2}\sqrt{\hat{\text{se}}_n^2 + n\cdot\hat{\text{se}}_n^2/N}).$$
In this setting $\widehat{\boldsymbol{\beta}}^T_n\boldsymbol{x}_i$ is your best estimate of the future experimental result $\widehat{\boldsymbol{\beta}}^T_N\boldsymbol{x}_i$, and $n\cdot\hat{\text{se}}_n^2/N$ is your best estimate of its variance.  In repeated sampling both $\widehat{\boldsymbol{\beta}}^T_n\boldsymbol{x}_i$ and $\widehat{\boldsymbol{\beta}}^T_N\boldsymbol{x}_i$ will vary, and this is reflected in the term $\sqrt{\hat{\text{se}}_n^2 + n\cdot\hat{\text{se}}_n^2/N}$.  The prediction interval above is the inversion of a Wald test of $H_0: \widehat{\boldsymbol{\beta}}^T_N\boldsymbol{x}_i= c$ using the pivotal quantity
$$\frac{\widehat{\boldsymbol{\beta}}^T_n\boldsymbol{x}_i-\widehat{\boldsymbol{\beta}}^T_N\boldsymbol{x}_i}{\sqrt{\hat{\text{se}}_n^2 + n\cdot\hat{\text{se}}_n^2/N}}\sim N(0,1).$$
The resulting p-value is a predictive p-value.  It represents the plausibility of the hypothesis given the observed data and is useful for controlling the type I error rate $\alpha$ when making a prediciton.  In repeated sampling a $95\%$ prediction interval will cover the future experimental result.  Let me know if I have made any mistakes, and if you need further details.  Here is a wikipedia entry on prediction intervals, and a paper.
