  We compare the power of quantum and classical physics in terms of randomness
certification from devices which are only partially characterised. We study
randomness certification based on state discrimination and take
noncontextuality as the notion of classicality. A contextual advantage was
recently shown to exist for state discrimination. Here, we develop quantum and
noncontextual semi-device independent protocols for random-number generation
based on maximum-confidence discrimination, which generalises unambiguous and
minimum-error state discrimination. We show that, for quantum eavesdropppers,
quantum devices can certify more randomness than noncontextual ones whenever
none of the input states are unambiguously identified. That is, a
quantum-over-classicaladvantage exists.
