I saw this page on disposition, it says that NPCs with more positive disposition will be nicer.
Will merchants give better prices to customers they like?
Prices in Skyrim are determined entirely by your Speechcraft skill (and any bonuses or perks therein). Prices are computed by the following:
The Base Price Factor is calculated by your skill level (fBarterMax default is 3.3, fBarterMin default is 2.0):
price factor = (fBarterMax * (100 - skill) + fBarterMin * skill)/100
The Modified Price Factor depends on perks and Fortify Barter bonus:
sell price modifier = (1 + Haggling %) * (1 + Allure %) * (1 + Fortify Barter from potion) * (1 + the sum of Fortify Barter from equipment + Fortify Barter from Blessing of Zenithar)
buy price modifier = (1 / (1 + Haggling %)) * (1 / (1 + Allure %)) * (1 - Fortify Barter from potion) * (1 - the sum of Fortify Barter from equipment - Fortify Barter from Blessing of Zenithar)
The final price combines the two Price Factors and rounds to the nearest whole number:
sell price = ([ value of item ] / base price factor) * sell price modifier buy price = [ value of item ] * base price factor * buy price modifier
At 0 skill and no perks, the final price factor is 3.3. At 100 skill and no perks, the final price factor is 2. At 100 skill and all perks the final price factor is 1.42857. Trade price cap: (max sell price = value * 1.00), (min buy price = value * 1.05).
Skill levels over 100 have no effect.
Firewood and certain ores are unique in that there exist "merchants" who will exchange items for gold directly. These transactions have hardcoded numbers, and do not technically count as transactions (i.e. won't give you speechcraft xp).