I would like to generate one random numer $single\sim N(0,1)$ and create the vector that contains only this one number: $one = [single, single, ..., single]$ . Later, I would like to combine with vector of multiple random numbers $several \sim N(0,1)$ using $weight$:
$New=weight*one+\sqrt(1-weight^2)*several$
Is it $New\sim N(0,1)?$
I thought so, because both $one$, and $several$ are random and generated from normal distribution. However, right now, I am not so sure. $one$ is in fact a vector of the same values so it might be treateat as constant here.
I tried to use R code to check below:
results<-matrix(ncol=4,nrow<-0)
colnames(results)<-c("sd(Normal)", "mean(Normal)", "sd(New)", "mean(new)")
for(i in 1:100000){
set.seed(i)
one<-rnorm(1,mean=0,sd=1)
several<-rnorm(4000, mean=0, sd=1)
weight<-0.20
NORMAL<-several #this is N(0,1)
NEW<- weight*one+sqrt(1-weight^2)*several #not sure if N(0,1)
vector<- c(sd(NORMAL), mean(NORMAL), sd(NEW), mean(NEW))
results<- rbind(results, vector)
}
colMeans(results)*100 #BP
sqrt(1-weight^2)*100 #BP
Results:
sd(Normal) mean(Normal) sd(New) mean(new)
99.99548850 -0.00423462 97.97516937 0.04152757
The results sd(New) are very similar to the $sqrt(1-weight^2)*100=97.97959$ and that raised my question about $New$ variable.