Effort Values do not affect Hidden Power. The reason you are getting a different type is because if you do not put them into the calculations, it assumes the IVs are higher (since you should have a higher stat with EVs, but if they aren't in there it assumes that stat is with 0 EVs and calculates the IVs accordingly).
While you are right that EVs do not affect IVs, in order to find the correct IVs all stats and EVs are taken into account.
While you are right that EVs do not affect IVs, in order to find the correct IVs all stats and EVs are taken into account.