In a recent twitter post, US Sec of Education John King asked: "Are we investing more in punishment than prevention? More in prisons than in schools?"
Good question. Note also that we are spending far more on testing than on school libraries. We are investiing in weighing the animal, not feeding it.
School libraries: About $10 per student = $500 million http://www.slj.com/2014/04/budgets-funding/sljs-2014-spending-survey-savvy-librarians-are-doing-more-with-less/#_
Data from 2011, 2012: I could not find more recent data.
Testing: Estimates range from 1.7 billion (J. Chingos, Brookings Institution, 2012) to 25 billion (https://www.washingtonpost.com/news/answer-sheet/wp/2015/03/11/five-reasons-standardized-testing-isnt-likely-to-let-up/)
Add to this: test prep paid by parents: 13 billion/ (https://www.washingtonpost.com/blogs/answer-sheet/post/a-21st-century-boondoogle-high-tech-testing/2011/04/11/AF37LZND_blog.html)