Optimal Rates of Teaching and Learning Under Uncertainty