Hi Madhusudan,
Have you tried editing these students' active status within the course to set their status to Inactive?
Course Admin -> Users -> Enrolled Users -- then click the cog next to the students' names who are not active: this brings up a Edit Enrollment screen. You then change their status to Inactive.
Then go to the gradebook preferences to have it no display inactive students. I've attached a job aid. We use this at our school. I have not noticed if it ignores the average and standard deviations calculations--maybe you can try this out and let me know?