For the vector of daily temperatures [T1 ··· T31] and average temperature Y modeled in Quiz 5.8, we wish to estimate the probability of the event.

To form an estimate of A, generate 10,000 independent samples of the vector T and calculate the relative frequency of A in those trials.
Quiz 5.8
The daily noon temperature in New Jersey in July can be modeled as a Gaussian random vector T = [T1··· T31] where Ti is the temperature on the ith day of the month. Suppose that E[Ti] = 80 for all i, and that Ti and Tj have covariance

Define the daily average temperature as

Based on this model, write a program p=julytemps(T) that calculates P[Y ≥ T ], the probability that the daily average temperature is at least T degrees.