The term "confirmation time" is a rather vague. If by that you mean the time it takes to form a block (to find a solution to the mining puzzle) then it can be calculated based on the current network difficulty (how hard it is to find the solution) and current total hashrate (how many solutions per second the network is able to try).
If you want to have faster blocks there has to be either an increase in the total hashrate (more solutions per second) or a lower the difficulty (easier to find solutions). But increasing the hashing power (at least if it happens by adding more nodes) has also other consequences: if there are "too many" nodes the amount of uncle blocks increases and therefore the average block time decreases. This happens due to an increase in network latency.
In private blockchains you can fully control the difficulty. So if you want you can have 1ms blocks. Or you could add more hashing power but that doesn't make much sense for a private blockchain (at least just for the sake of faster blocks). In the public Ethereum blockchain the difficulty is quite constant although it can slowly change based on various things.
Bear in mind that even if a solution is found it doesn't mean that it will stay in the canonical chain: it may end up as an uncle block due to consensus reasons.
All the actual mathematical stuff can be found at the Yellow Paper: https://ethereum.github.io/yellowpaper/paper.pdf