missing and loseing power

when i start my mx5 cold or even just turned off for 10 mins when i drive it misses an loses power as if it is runing out of petrol it wil chock for a few yards on the road and then go ok and take off like a rocket what would be rong
i was told it was the sensor on the excust wud this be right
i was told it was the sensor on the excust wud this be right