tags:

views:

52

answers:

4

Hi,

I am trying to have a ratings strategy in the hotels search website.Ratings is based on number of clicks by the users who view different hotels.I am trying to assign number of points to each click.

Suppose i have a POINTS column in the hotels table which increases by the number of clicks on each hotel, the problem i face is suppose i have a hotel1 which was introduced in week1 then it gains considerable amount of points by week2 but if i introduce a new hotel2 at week2 although this new hotel is competetively increasing the points it cant reach easily the hotel1 becoz of there difference in weeks which they were introduced.

I thought a way to solve the above problem by introducing a DAYS column then i can divide the POINTS of each HOTEL by number of days so that i can have clear ratings to each hotel.

I need your help about how i get the number of each passing day in the DAYS column after new hotel is added in the table of database.

+2  A: 

It would probably be better to have a CreateDate column, and then in client side code do something along the lines of:

int days = Date.Now.Subtract(hotel.CreateDate).Days;

This will cause less updates to your database too, as the date only needs to be set on create.

Pondidum
+1 - beat me to it!
Shaul
Thanks for the explanation i follow your suggestion
+2  A: 

I'm not going to go into the statistical theory of what you're doing, but let me state for the record that I think your stats are going to be misleading.

Be that as it may, just to achieve what you say you want to achieve, I would do what @Andy just said you should do. (Beat me to it!)

Shaul
+1 i agree on the misleading stats...
Pondidum
um, statistically this would be a daily average of clicks / hotel., would it not?
flq
yes, so in the non-holiday season, all hotels will become less popular, which I suppose is accurate in a way.
Pondidum
i also feel its misleading ..do you have any suggestions to implement this
A: 

An alternative to calculating the days in code would be to use a computed column in the database (assuming by the sql tag you meant sql server). As the other posters have said, add a CreateDate column for the hotel and then add a computed column to return the date diff.

Chris W
+1  A: 

As I understand it, you are asking people to "vote" on the hotels, but the only possible votes are "yes" and "no vote".

Whether this is statistically valid will depend on when people are asked to vote. If every time someone visits a hotel, you ask him whether he was satisfied with his stay, and people consistently do this, I suppose it would be generally valid. But if the scoring system is such that users do not perceive a need to re-vote on a hotel that they have already voted on, then hotels that are on the list longer will see their ratings tend to sink. If it reached a point where every user who had visited a hotel has voted (or not), and no one saw a need to vote again, then that hotels score would gradually sink.

Also, this system would be biased in favor of big hotels. If hotel A has 500 rooms and hotel B has 10 rooms, it would b e very tough for hotel B to ever get as many votes as hotel A.

I think you'd be better to ask people to rate the hotel on some scale -- 1 to 5 stars or whatever -- and then present the average score. Probably along with the number of ratings, as people can probably figure out that if there's only one rating and it's the highest possible, that might be the owner rating his own hotel.

Jay
+1 good statistical analysis
Shaul