function [m,v]=importanceQ(nsim,mu)
% estimates proportion of time that an MG1 queue >20 in system using MM1 queue 
% for importance sampling. arrival rate=1, service time is gamma(.9,1)
% mu=rate for eponential service times.
imp=[];
for i=1:nsim
 IA=exprnd(1,1,1000);
 S=exprnd(1/mu,1,1000);
 [ANS,ATS,arrivet,departt,ET,NS]=MG1Q(IA,S);
 T=Time(20,ET,NS);
 imp=[imp T*prod(gampdf(S,.8,1)./exppdf(S,1/mu))];
end
m=mean(imp);
v=var(imp);






