Smart grid is a system in which it is possible to use voting-based techniques to resist sabotage of several cyber-attacks. The adaptation of these techniques can be difficult and useless in the case when the malicious resources (i.e., smart meters) of this system can return wrong data in same time; however, the collusion problem is triggered. To detect and resolve the collusive issue, spot-checking technique has been proposed by sending randomly certain number of spotter queries to chosen resources with known correct data in order to estimate resource credibility based on the returned data. This work proposes an original method that resist against collusion attacks by using probability to solving a new spot-checking optimization problem for smart grid systems, with the objective to minimize probability of accepting wrong data (PAWD) while respecting an expected overhead constraint. The proposed solution contains an optimal combination of several parameters, the number of spotter queries sent, the number of resources tested by each spotter query, and the number of resources assigned to run the genuine query. The optimization procedure includes a new method for evaluating performance metrics of PAWD and expected overhead in terms of the total number of query assignments. To demonstrate the proposed optimization problem and solution procedure, we have provided several illustrative examples.