In this paper, Ω denotes the set of all subsets of commuting elements of G in the form of (a, b), where a and b commute, |a| = |b| = 2. The probability that a group element of G fixes a set is one of the generalizations of the commutativity degree that has been recently introduced. In this paper, the probability that an element of a group fixes a set for semi-dihedral groups and quasi-dihedral groups is found. The results obtained are then applied to graph theory, more precisely to the generalized conjugacy class graph.Mathematics Subject Classification: 20P05, 20B40, 97K30