std1<-sqrt(0.0036)
std2<-sqrt(0.0576)
rho<- -1
x1<-seq(0,1,0.01)
x2<-1-x1
var_p<-x1^2*std1^2 + x2^2*std2^2 +2*x1*x2*rho*std1*std2
final<-cbind(x1,x2,var_p)
final2<-final[order(final[,3]),]
head(final2)
x1 x2 var_p
[1,] 0.80 0.20 8.673617e-19
[2,] 0.79 0.21 9.000000e-06
[3,] 0.81 0.19 9.000000e-06
[4,] 0.78 0.22 3.600000e-05
[5,] 0.82 0.18 3.600000e-05
[6,] 0.77 0.23 8.100000e-05