estimateHighQuantile <- function(zNotMtx, cumTrapsMtx,
						zActualVec, quantile = 0.95)
{
	#estimates the given quantile conditional on the observed
	#can be on frechet scale or original scale
	
	numReps <- dim(zNotMtx)[2]
	count <- numeric(numReps)
	
	for(i in seq(1, numReps))
	{
		numPts <- sum(!is.na(zNotMtx[,i]))
		index <- seq(1, numPts)
		k <- cumTrapsMtx[1:numPts,i] > quantile
		lowUpBd <- min(index[k])
		quantileEst <- zNotMtx[lowUpBd, i]
		count[i] <- zActualVec[i] > quantileEst
	}
	
	return(count)
}