Question: A typical modern scenario of the medieval siege was the throwing of oil on the attackers from ramparts. Oil was really expensive so why waste it on attackers? Most commonly the items thrown were boiled sewage, rocks, and arrows. Does anyone know of any primal source of evidence of boiling oil being used as a weapon in sieges?

Answer: 
Like this thread on [catapulting diseased dead bodies](https://history.stackexchange.com/questions/360/how-did-a-besieged-city-castle-defend-itself-vs-catapulting-diseased-dead-bodie/368#368), the pouring of boiling oil and tar did happen, though not so commonly. Remember that many castles never saw action. Many more castles were built decoratively as a fashion rather than because defence was needed. However, when you look to city walls and city gates, you see more use. A city will have the resources to summon up even expensive weapons if really needed.

One clear example I can find is in the crusaders attack on Jerusalem in July 1099, oil and Greek fire (thought to be oil based) was employed by the defenders. Mangonels, rams and siege towers had been moved into position beneath the gate of the city. These were set alight by the defenders using oil and burning arrows. Several books mention that the wall climbers were scalded by oil.

Basically, when you are under attack for your life, you will throw everything you have down the murder holes or over the wall. Stones, arrows, burning wood, and if you have to, the oil. Even though it might be expensive - it's cheaper than losing your life should the city fall.
Incendiary devices were frequently used as projectiles during warfare, particularly during sieges and naval battles; substances were boiled or heated to inflict damage by scalding or burning. Other substances relied on their chemical properties to inflict burns or damage. These weapons or devices could be used by individuals, manipulated by war machines, or utilized as army strategy.
The simplest and most common thermal projectiles were boiling water and hot sand, which could be poured over attacking personnel. Other anti-personnel weapons included hot pitch, oil, resin, animal fat and other similar compounds. 

* Smoke was used to confuse or drive off attackers.
* Substances such as quicklime and sulfur could be toxic and blinding. Sulfur- and oil-soaked materials were sometimes ignited and thrown at the enemy, or attached to spears, arrows and bolts and fired by hand or machine.
* Fire and incendiary weapons were used against enemy structures and territory, as well as personnel, sometimes on a massive scale.
* Large tracts of land, towns and villages were frequently destroyed as part of a scorched earth strategy.
* Incendiary mixtures, such as the oil-based Greek fire, could be launched by throwing machines or administered through a siphon.

Some siege techniques—such as mining and boring—relied on combustibles and fire to complete the collapse of walls and structures..