Displaying indexes in balloon help

Value attribute showing indexes

In a meeting today, Paul Sanford suggested that it would be nice if Analytica would show the indexes of a variable when you hover over its node.  "I know how I can do that right now," I volunteered. I thought I'd share this with other Analytica users here. The help balloon with my modification shows the indexes on the last line. The indexes come from the computed result, so it only shows them if the result is already computed.  If the result has already been computed and is scalar, then it shows the value, allowing you to hover over nodes and see their scalar values (text or numbers) quickly. To make it easy, I've placed this in a library file, Show-Indexes-In-Help-Balloons.ana. If you want this, all you have to do is add this library to your model (use Add Module... or Add Library... on the File menu, embed). How does it do it? The code in Analytica that decides what should appear in a help balloon is actually implemented as an Analytica expression, and it resides in … [Read more...]

Greenhouse Gas Emissions and Energy Expenditure from Santa’s global tour

SantaGHG

In four days, Santa Claus will embark on his annual Christmas eve ritual, delivering presents to the good little boys and girls around the world. In this article, I look at the net energy expenditure and greenhouse gas emissions attributable to this magical tour. Many aspects of Santa’s amazing technology are not publicly available, so it will be necessary to make numerous educated guesses to complete the analysis. I will derive an estimate for the total distance traveled, velocities obtained, work expended to reach the implied kinetic energies and energy losses due to air friction. Then I’ll consider the caloric efficiency of reindeer, the methane emissions due to reindeer manure and flatulence and the carbon dioxide emissions during the agricultural production of the carrots used to fuel their trip. Distance Traveled I’ll begin with an estimate of how far Santa must travel on Christmas Eve to visit the 300M or so households with children worldwide that celebrate … [Read more...]

Analytica 4.4.3 Patch Release

Analytica 4.4

Today we announce the Analytica and ADE 4.4.3 patch release. The patch has an extensive number of fixes and improvements since the 4.4.2 release. We recommend that all Analytica and ADE 4.4 users install and start using 4.4.3. When you already have an earlier 4.4 installed, installing the patch takes about a minute. If you have an internet connection and use Analytica 4.4, it will automatically detect the new patch within the next few days, download the installer, and then the next time you run Analytica, it will ask you if you want to install it. To update ADE, or if you need to download the installer manually, just visit the Lumina.com downloads page. The Analytica Wiki contains a comprehensive listing of all changes in this patch release at Build 4.4.3 release notes.  I'll mention some of my favorite highlights here. Proactively evaluate indexes: This preference controls whether Analytica evaluates indexes when a model is first loaded, as well as whether … [Read more...]

Is the media wrong about how many Mega-Million tickets were sold?

Binomial(540M,1/176M)

A few days ago on this blog, in Binomial distribution and Mega-Millions Lottery ROI, I wrote about statistically predicting the number of winners in a lottery, and the impact this has on the mean return-on-investment of a lottery ticket purchase.  Now that the outcome of last week's record-setting Mega-Millions drawing is known, we have an opportunity to compare how the actual outcome compared to the prediction made by the binomial distribution model. A news article by Margery A. Beck of the Associated Press claims that 1.46 billion tickets were sold in the run-up to last week's drawing.  The article was cited by several major newspapers, including the Los Angeles Times.   If that number is credible, it is a spectacular two-day increase from the 50M tickets that had been sold as of Tuesday according to an article in Wednesday's San Jose Mercury News.  It far exceeds the upper end of 250M that I used in my analysis last week.  However, the post-hoc analysis that … [Read more...]

Binomial distribution and Mega-Millions Lottery ROI

Binomial(107M,1/3.9M)

As of this morning, the Mega-Millions lottery for this week is at a record-setting grand prize level of $540M (when taken in installments) or $389M lump sum payout.   The odds of any given ticket winning is 1 in 175,711,536.  So, if you are a risk-neutral "investor" and you buy a ticket,  your mean return-on-investment (ROI) may actually be positive in this case -- a highly unusual situation for a lottery.  Hopefully you see the main opportunity that this presents: the opportunity to learn about the Binomial distribution! If it were as simple as saying that you had a 1 in 176M chance of winning $389M, then your mean winnings would be $2.17 for a $1 ticket.  That would be a 117% ROI in only a few days time.  Of course, it is not that simple due to two complicating factors: (the potential for) multiple winners, and taxes.  When there are multiple winning numbers, the prize is split between winners, so even if you win you might receive only half, or one-third of the … [Read more...]

Percentile Contour Plots

The Percentile Contour Plot

I saw a graph today that I thought was pretty cool and thought I'd share it here.  In his Analytica model, Andrew DeBenedictis of E3 created a depiction energy usage percentiles by time of day in each month.  I think a plausible name for this type of plot would be a Percentile Contour plot. Andrew tells me he got the idea from the Contour/Regions Charts page that I had written many years ago on the Analytica Wiki, which shows how to create plots like these: Nevertheless, I particularly liked the use of gray-scale to show the percentile (amount of activity), the customized scaling of percentiles, and layout of Andrew's graph.  So, how do you put a percentile contour graph like this together?  I thought I'd try it here. First, of course, I need some data, such as Energy_usage, indexed by Hour of day and Month, and for that I need the Hour and Month indexes: Index Hour := 1..24 Index Month := 1..12 Variable Energy_usage := Table(Hour,Month) I … [Read more...]

Combination of Assessed Distributions

Future Population

Suppose you need information about the future population Metropolia City in the year 2020.  So you solicit two experts to provide assessments of this quantity and provide their expert judgments in the form of distributions as shown. Which assessment is better?  Who is right?  How can you combine these to arrive at a combined distribution that embodies the combined knowledge of both experts? The experts' distributions in this example are LogNormal(100K, 1.2), and LogNormal(90K,2). Calibration Arguably the most important criterion for judging a subjective assessment is for the source of that assessment (i.e., the expert) to be well-calibrated.   Calibration is a property of the assessor, not a property of a single assessment, and reflects the accuracy to which an expert can quantify his degree of uncertainty.   Being well-calibrated reflects the idea that over the course of many assessments, his assessed probabilities correspond to the empirical frequency of … [Read more...]

Marginal vs. Effective Tax Rates

Tax brackets

Last week Presidential candidate Mitt Romney released his tax returns, and the news channels were abuzz with commentary about his effective federal tax rate of 13.9% on $21.7M of income.  I will refrain from my own commentary on his situation, but what particularly piqued my interest were the quotes I heard from “ordinary” people on the radio.  Everyone, it seems, claims to pay a higher federal tax rate than Mr. Romney.  Typical was a person interviewed in a news report who stated “I pay 28% in taxes and have trouble every month making my rent.” Listening to people comment on their own tax rates left me with two impressions.  I couldn’t help but feel that most, if not all, of the people I heard were severely overestimating their own effective federal tax rates, and I suspected that most people did not understand the difference between effective tax rate and marginal tax rate.  I also saw an opportunity to fire up Analytica to explore the relationship between the two … [Read more...]