Help with 3D plot!



^


Hello everyone!

I am new here, and would appreciate it very much if someone
can help me with the following issue. It is a very
interesting question/quiz for experts!

(please reply if you can provide even the slightest help!)
Thanks in advance,


Intro:

There is an artificial market with customers present in it.
Each customer has a price and waiting time value.

The price value of customers is generated using a Gamma
distribution (with preset numeric parameters) and the wait
values are generated from another Gamma distribution based
on the price value of each customer (i.e. one of the
parameters of the Gamma distribution for waiting times is
determined from customer price value).

Currently, given an arbitrary customer, I can calculate the
probability of all price values (from 0 to 100) using the
following M-file:

http://www.maths.lth.se/matstat/wafo/documentation/wafodoc/wafo/wstats/wggampdf.html


I can also calculate the probability of various customer
waiting times (from 0 to 50), if I know the price value of
that customer.


The Problem:

How to calculate the combined probability in MatLab? i.e.
How can we calculate what is the probability that a customer
c, has a waiting time of t1 and a price of p1?
Mathematically this is performed by multiplying the
probability that a customer has that price p1 by the
probability of the customer has a waiting time t1 given his
price is p1. But I do not know how to perform this operation
in MatLab, . . .

How to generate a 3D surface that its X-axis is the price,
its Y-axis is the waiting time, and the Z-axis is the
probability P().
In other words, the plot will show what is the probability
that customer c has price x, given it has a waiting time t.

Currently I am typing the following commands but I don’t get
the correct answer:


price_values = linspace(0,100,200);

time_values = linspace(0,50,200);

[PRICE,TIME]=meshgrid(price_values,time_values);

PROBABILITY = wggampdf (PRICE , 180 , 0.5 , 1) .*
wggampdf(TIME , 50 – 49.*PRICE , 1 , 1);

surf (PRICE , TIME , PROBABILITY , ‘EdgeColor’ , ‘none’ );

//It seems I am not using the correct operators or messing
up the dimensions??
NB. wggampdf (x , a , b , c ) : this function calculates
the probabilities of the values in matrix/array x from a
Gamma distribution with parameters a , b , and c.
http://www.maths.lth.se/matstat/wafo/documentation/wafodoc/wafo/wstats/wggampdf.html



.



Relevant Pages

  • Help with 3D plot!
    ... Each customer has a price and waiting time value. ... The price value of customers is generated using a Gamma ... I can also calculate the probability of various customer ...
    (comp.soft-sys.matlab)
  • Help with 3-D surface . . .
    ... The price value of customers is generated using a Gamma ... Gamma distribution based on the price value of each customer ... the parameters of the Gamma distribution for waiting time is ... I can also calculate the probability of various customer ...
    (comp.soft-sys.matlab)
  • ieShoes.com Shop nike air jordan air force 1 dunk sb bape sta shoes
    ... Main Menu Search Basket Content Checkout Customer Service Order ... Air Force I ... Air Jordan 11-22 ... NOTE:All the list price include the shipping charge.thank you! ...
    (comp.lang.python)
  • ieShoes.com Shop nike air jordan air force 1 dunk sb bape sta shoes
    ... Main Menu Search Basket Content Checkout Customer Service Order ... Air Force I ... Air Jordan 11-22 ... NOTE:All the list price include the shipping charge.thank you! ...
    (rec.bicycles.misc)
  • ieShoes.com Shop nike air jordan air force 1 dunk sb bape sta shoes
    ... Main Menu Search Basket Content Checkout Customer Service Order ... Air Force I ... Air Jordan 11-22 ... NOTE:All the list price include the shipping charge.thank you! ...
    (rec.running)

Loading