Reports from two Long Island real estate brokerages show that the housing market is still struggling.

Pending sales – homes in contract – dropped 7 percent to 4,134 contracts in the fourth quarter of 2011, down from 4,447 contracts in the fourth quarter of 2010, according to the latest report from real estate broker Prudential Douglas Elliman and property appraiser Miller Samuel.

The median price of homes sold was $339,000, down 4.8 percent from the $356,050 median price a year ago. It also took longer to sell a home. The average time a home spent on the market before being sold was 130 days in the fourth quarter of 2011, up from an average of 119 days in 2010.

The report also compared 2011 housing numbers with 2002 and found that there were about half as many Long Island homes sold last year – 17,409, than were sold a decade ago – 34,466.

The median sales price, now $350,000, is up about 20 percent since 2002, when the median sales price was $290,000.

In the Hamptons, home prices were also lower, but sales were up.

According to Brown Harris Stevens’ fourth quarter market report for East End homes, the average residential sale price on the South Fork of $1.71 million was down 8 percent when compared to the fourth quarter of 2010. At $842,500, the median price was down 13 percent over that same period.

Home sales of under $1 million rose 16 percent with 178 closings in the fourth quarter of 2011 compared with 153 in the fourth quarter of 2010.