Statistics for Electronic properties of zigzag ZnO nanoribbons with hydrogen and magnesium passivations