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