Cosmological inference using gravitational wave standard sirens: A mock data analysis