Determinant of confirmation time There seems to be a lots of variations in confirmation time. 

https://blockchain.info/charts/avg-confirmation-time

I would like to understand factors that affects the confirmation time.
Confirmation time is effected by two things: the time to find a block, and the transaction fee paid by a transaction.

Since a confirmation means that a transaction has been included in a block, one factor in the time for a transaction to confirm is the amount of time it takes to find a block. This is, on average, 10 minutes. However the time between blocks is not always 10 minutes, it can vary quite a lot, typically from a few seconds to 2 hours. This means that if miners just happen to be really unlucky for a certain block, then the confirmation time for a transaction could be very long.

The other limiting factor is the transaction fee. For a transaction to be confirmed, a miner must select it for inclusion in their block. The selection is based by transaction fee (specifically the fee rate). Transactions that pay a higher fee rate will be selected first. If there happens to be a lot of unconfirmed transactions, transactions with lower fee rates will take longer to confirm as they have to wait for the transactions that pay higher fee rates to be confirmed first. This will also effect confirmation times.