+ Reply to Thread
Results 1 to 7 of 7

probability of analisys based on historical data

Hybrid View

carwiz probability of analisys based... 01-03-2013, 10:58 AM
MrShorty Re: probability of analisys... 01-03-2013, 11:52 AM
carwiz Re: probability of analisys... 01-03-2013, 12:54 PM
gjrr4x1 Re: probability of analisys... 01-03-2013, 01:22 PM
carwiz Re: probability of analisys... 01-06-2013, 09:05 AM
MrShorty Re: probability of analisys... 01-03-2013, 02:12 PM
carwiz Re: probability of analisys... 01-06-2013, 09:09 AM
  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    probability of analisys based on historical data

    I rent vacation homes to tourists. My Excel spreadsheet lists arrival and departure dates for each booking going back several years. I’m interested a calculating a probability of the occupancy on each date. The information will be used to optimize daily rental rates.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,373

    Re: probability of analisys based on historical data

    It seems like the simplest measure of "probability of occupancy" would be the fraction occupied in the current data set. Pseudocode =count(years occupied for a given date)/total number of years the data covers.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    01-03-2013
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: probability of analisys based on historical data

    Quote Originally Posted by MrShorty View Post
    It seems like the simplest measure of "probability of occupancy" would be the fraction occupied in the current data set. Pseudocode =count(years occupied for a given date)/total number of years the data covers.
    I may not been clear in my post. I need to determine occupancy per each day based on several years of data. It may take several steps to accomplish. I was thinking of doing this:
    1. since I only have arrival and departure dates a macro will be needed to fill the rest of the dates in-between.
    2. create a pivot table to display a number depending on occupancy. For example, I should see that a given day was occupied 3 times in 7 years. I can make a decision to adjust pricing based on that data.
    3. Macro to loop to next row

    Unless someone knows a simpler way, I could use help in creating that code.

  4. #4
    Registered User
    Join Date
    11-14-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: probability of analisys based on historical data

    Why don't you copy paste all the years into one Sheet, such that the days are the rows (E.g. 1 Jan, 2 Jan, 3 Jan.....) and the years the columns (2005, 2006, 2007....), then give a 1 to occupied days and a 0 to non-occupied days and then sum the rows (E.g. B2 to B8) and divide by 7 (the number of years). To the cell summing up (Say B9) you can format the cells such that if occupancy is for example below 0,40 then it's coloured red, if it's between 0,4 and 0,7 let's say yellow and >0,7 green.

    Finally, you could create a table in which the days in which the days in red appear or order the days of the year from lowest occupancy to highest occupancy. This way in an eye glimpse you can tell in which days it may be convenient to adjust the price (i.e. the first of the list or the red ones).



    It's a simple way of doing it. I'm sure there's a cleverer way of doing it though.

  5. #5
    Registered User
    Join Date
    01-03-2013
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: probability of analisys based on historical data

    Thank you for your help. Your explanation is simple and clear.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,373

    Re: probability of analisys based on historical data

    1. since I only have arrival and departure dates a macro will be needed to fill the rest of the dates in-between.
    I don't know that a macro is necessary. It depends on how you are most comfortable programming. Some people seem more comfortable with symbolic languages (like VB) and only use the spreadsheet as an input/output device (like some people use a text file). Others are more comfortable with spreadsheet formulas and prefer to use the spreadsheet as a spreadsheet. It will be up to you to decide if you prefer VB or if you prefer spreadsheet formulas.

    As gjrr4x1 points out, a lot of the details in this will depend on how the raw data is laid out, and how much control you have over that. My first thought was similar to gjrr4x1's solution. In this scenario, you end up doing a lot of what you are asking the in part 1 in your head as you enter the data into the spreadsheet. Depending on programming skill and how often this needs to be done, it might be easier and more efficient to do some of the work in your head like this.

    Since you haven't given an example of how your raw data is laid out, it is hard to be specific. Here's one approach I envisioned using only spreadsheet formulas.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-03-2013
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: probability of analisys based on historical data

    Great explanation and the sample worksheet. This is what I needed. You had practically done all the work for me. Thank you for your advice and generosity.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1