So far, I've introduced a lot of concepts to you; attributes, profiles, part-worth utilities, et cetera, and I'm sure it's starting to turn into a big cloud into your head. So let's try to clear out the fog using a concrete example. I'm going to be discussing this made-up case of ferry fares. So let's consider a ferry fare near a metropolitan city. For example, Hong Kong has a lot of ferries that go back and forth between the different islands. We're going to use two factors for deciding ferry fares; the travel time between two points, A and B, and the actual cost of the ticket fare. We're going to ask potential users to rate on a scale of 0 to a 100, 100 being the best and zero being the worst, how they feel about different combinations. So here's the fare; $3.10, $3.70, $4.30, and the duration of the trip; 10 minutes and 20 minutes. Now, it's easy to imagine we can make this chart expand to the right by having different levels of time and different levels of prices, but let's stick with these three basic ones for now. So we have for fare, a low price, a medium price and a high price, and for the duration of the trip, 10 minutes and 20 minutes or fast and slow. The fare helps you understand the preferences of the customer and the trade-offs they're willing to make in terms of the length of time it takes. So if we study this table a little more carefully, we can make some observations based on the survey. This one particular respondent, obviously, likes the cheapest fare. This one, the cheapest fare in the shortest amount of time, they liked that the best and they rated that 100. The worst one is the most expensive fare and the longest time. Then, everything in between us some mix. One interesting observation, if you look, is these two numbers here, 92 and 94, they're almost identical. So this particular respondent is willing to give up $0.60 for an extra 10 minutes of time. So the difference in price and the difference in fare is $0.60 between these two numbers, and the difference in time is 10 minutes. So if they're riding the cheap fare for 20 minutes, they get on their personal scale, they rated it as a 94, but they're almost willing to pay $3.70 for a shorter time period, and these are almost equivalent. So that's where these trade-offs begin to take place. The more data you collect, the more you'll have an understanding of the marketplace. So how do we code this table for a regression model? We have to set up dummy variables. So the dummy variables here are as follows; we have F_1, and that's if the fare is $3.10 and zero otherwise. So what that means is F_1 will equal one or zero and it depends on the fare. If the fare is $3.10, then it's a yes. Otherwise, it's a no. So fare one is $3.10, fare two is, similarly, $3.70. So if the fare is $3.70, yes or no. Okay. Then, D_1 is the travel time, if it's 10 minutes and zero otherwise. Dummy coding just sets the part-worth utilities within the attributes to be estimated and note that we don't have to specifically set up a dummy variable for the last category since it's implied. So on the left-hand side of this table, we can see the original data and the rating. So this is just all the fares are listed out and then the durations in each of the combinations. So there's still six boxes; one, two, three, four, five, six, for the ratings. The cheapest fare and the fastest ferry ride is still a 100, and the most expensive fare and the slowest ferry ride is 60, and all these are filled in. In order to code for the regression, here are the three variables; F_1, F_2, F_3. Recall F_1 is if it's a fair of $3.10. So note that these are $3.10 and these say yes. F_2 is for the medium fare $3.70 and it says yes. There it is. Then, we don't need to code for the $4.30 since that is implied. Then, finally, for the D_1, the duration, we're going to set the code D_1 to a yes or a one if the duration is 10. So 10, yes, that's a one. Ten, yes, that's a one. Ten, yes, and that's a one. Then, I think that's it. Yes, that's everything. So now, we have all the combinations in our data coded as dummy variables. I would spend some time maybe pause the video and stare at this to make sure you understand what's going on. So here is the regression equation. Here we can still see our dummy variables. There are here; F_1, F_2, D_1, and we're going to estimate the model of preferences based on an intercept term, Y intercept term. Then, here are the dummy variables, and we're estimating this X_1, X_2, and X_3. These are the variables we're estimating. Y is the total combination of the rating of the individual. X_1, X_2, X_3 are the coefficients that we are looking for. So given the data, here's our regression result. We can see the intercept term is 61, here. The P-values all look good. They're all less than 0.05. The coefficient for X_1 is 31.5, for X_2 is 21.5, and for X_3, it's a nine. Then, here are the standard errors. We can see the R Square looks pretty good. Actually, it looks very good. I think that's just due to the number of observations we have. Here is the model. So Y, it's the total utility, is equal to 61, that's our intercept term, plus 31.5 for F_1, and F_1 is whether it's a cheap fare or not. So if it's cheap fare, yes at 31. If it's a more expensive fare, maybe a medium fare, then you add 21.5 to the 61, and then duration of the trip will give you, if it's a short duration, another nine points. So let's look walk through an example. Recall, that in the table, the slowest trip of 20 minutes and a fare of $4.30 was rated as a 60. Right? So $4.30 and slow was at 60. We coded those as zeros. So if you look at the model here, F_1 is zero, F_2 is zero, and D_1 is zero. Right? Because this is the highest fare, not F_3, and it's slow. So that was coded as D_1 is zero. So if you look that, these three terms here are zero and we have inner model, our estimate is Y has a value of 61 which is pretty close to the actual value of 60. If we look at, let's do slow again and we'll do a fare one, which is the cheap fare. We have 61 plus 31.5 and that would be 92.5. The actual value for cheap fare and slow was 94. So that's pretty close as well. I encourage you to go through this model here, this Y equation, and calculate the different utilities and compare them to the actuals that we had from our survey. The next step is to understand what are the part-worth utilities. We're going to break it down and we can split into two functions for the fare. The part-worth the utility for the fare, U of F, is 31.5 for the cheap fare plus 21.5 for the expensive fare. You can see that for duration it depends if it's a short duration or long-duration and you get this coefficient of nine based on that. So these are the partial or the part-worth utility functions. That's how you can separate out the preferences of the customer based on the cost of the ride versus the duration of the ride.