How can coinbase charge less than the average transaction fee? As of this writing, the average bitcoin transaction fee is over $30, according to this chart.  However, I just bought $20 worth of bitcoin on coinbase, and they charged me a fee of $1.49.  

My understanding of the fee for a transaction is that it is a function of market forces, the number of bytes in the transaction, and the time you are willing to wait for your transaction to be added to the blockchain.  Overall however, I had the impression that at a given time these fees are relatively constant per transaction.  So I would expect that coinbase would have to spend something around $30 in fees to give me my $18.51.  

What don't I understand?
Coinbase holds a large amount of Bitcoins. When you buy Bitcoin on Coinbase, they do not need to actually send it to your wallet, they just need to say on their servers that you own X amount of Bitcoins. They charged you $1.49 because of the payment you used and/or to take a small profit. If you were to move your Bitcoins to a wallet you actually own at home, you would have to pay the miners.