unistalling el capitan and installing yosemite issue
If the Mac in question shipped with OS X 10.11.x on it, it likely will not be able to run a previous version of OS X (like OS X Yosemite.) This is because as Apple updates hardware, they build the drivers for the new hardware into the OS that the Mac comes with and also into later versions of OS X. 

A version of OS X which was released before that Mac model won't have the correct hardware drivers for that Mac. Apple's pretty upfront about it and states Avoid using versions of OS X that are older than what came with your Mac.

Apple maintains a knowledgebase article that shows which versions of OS X shipped with which hardware. It's available via the link below:

OS X versions and builds included with Mac computers

For more information on this issue, please see the link below:

Use the version of OS X that came with your Mac, or a compatible newer version