Negative association and negative dependence for random upper semicontinuous functions, with applications