Installing a clean version of OS X
Yes. Creating a new partition, installing Yosemite (or whatever Mac OS you care) there and then copying/downloading the installer onto it is a great way to then erase your Primary partition.

Then you can cleanly install OS X on to the first partition and then delete the "staging" partition, finally resizing the first partition to take the whole drive again.

My way is "better" since if you install on to the second partition, deleting the first might leave you with space you can't re-grow the second partition to recover the first. I've never seen a case where I can't delete follow on partitions and then grow the first to take up all space.