Kansas City Fed: Regional Manufacturing Activity “Expanded at Slow Pace” in April

By | ai, bigdata, machinelearning

From the Kansas City Fed: Tenth District Manufacturing Activity Expanded at a Slower Pace

The Federal Reserve Bank of Kansas City released the April Manufacturing Survey today. According to Chad Wilkerson, vice president and economist at the Federal Reserve Bank of Kansas City, the survey revealed that Tenth District manufacturing activity expanded at a slower pace with solid expectations for future activity.

“We came down a bit from the rapid growth rate of the past two months,” said Wilkerson. “But firms still reported a good increase in activity and expected this to continue.”

The month-over-month composite index was 7 in April, down from the very strong readings of 20 in March and 14 in February. The composite index is an average of the production, new orders, employment, supplier delivery time, and raw materials inventory indexes. Activity in both durable and nondurable goods plants eased slightly, particularly for metals, machinery, food, and plastic products. Most month-over-month indexes expanded at a slower pace in April. The production, shipments, and new orders indexes fell but remained positive, and the employment index edged lower from 13 to 9. In contrast, the new orders for exports index increased from 2 to 4. Both inventory indexes fell moderately after rising the past two months.
emphasis added

The Kansas City region was hit hard by the decline in oil prices, but activity is expanding again.

This was the last of the regional Fed surveys for April.

Here is a graph comparing the regional Fed surveys and the ISM manufacturing index:

Fed Manufacturing Surveys and ISM PMI Click on graph for larger image.

The New York and Philly Fed surveys are averaged together (yellow, through April), and five Fed surveys are averaged (blue, through April) including New York, Philly, Richmond, Dallas and Kansas City. The Institute for Supply Management (ISM) PMI (red) is through March (right axis).

It seems likely the ISM manufacturing index will decline in April, but still show solid expansion (to be released next week).

Source link

Learning by Doing

By | ai, bigdata, machinelearning

The New York Times did it after the election, in January 2017: You Draw It, Learning Statistics by drawing and comparing charts.

‘Draw your guesses on the charts below to see if you’re as smart
as you think you are.’

And Bayerischer Rundfunk did it before the election, in April 2017.

This kind of giving information is an excellent strategy to foster insights and against forgetting. And it’s an old tradition in didactics. 360 years ago Amos Comenius emphasized this technique in his Didactica Magna:

“Agenda agendo discantur”

Filed under: 031 Data visualization, 033 Statistical literacy Tagged: Comenius, drawing, interactive charts

Source link

So Was I

By | machinelearning

While Bill marched at the main March for Science in DC, I marched at the satellite march in Atlanta, my daughter Molly in Chicago, Scott Aaronson in Austin, Hal Gabow in New York, and Donald Knuth (pictured) presumably in San Francisco. I thank the many of you who participated in your local march. Science appreciates the support.

Most of the marchers I saw did not come from the ranks of academia or professional scientists. Rather people from all walks of life who believe in the important role science and scientists have in shaping our future. Parents dragged their kids. Kids dragged their parents.

There have been some worry about politicizing science and whether the march would be a bad idea. The march won’t have much effect on policy positively or negatively. But we mustn’t forget that scientists need to deal with politics, as long as the government continues its missions of funding science and using proper science to help guide policies that require understanding of the world.

If there’s one positive sign of a Trump presidency, as Molly explained to me, it’s inspiring a generation. We would not have had a March for Science if Trump wasn’t president, but what an wonderful movement and we should march every year around Earth Day no matter who sits in the oval office.

Source link

Bayes Theorem: A Visual Introduction For Beginners

By | iot, machinelearning

Bayes Theorem Examples: A Beginners Visual Approach to Bayesian Data Analysis

If you are looking for a short beginners guide packed with visual examples, this booklet is for you.

From Google search results to Netflix recommendations and investment strategies, Bayes Theorem (also often called Bayes Rule or Bayes Formula) is used across countless industries to help calculate and assess probability.

Bayesian statistics is taught in most first-year statistics classes across the nation, but there is one major problem that many students (and others who are interested in the theorem) face. The theorem is not intuitive for most people, and understanding how it works can be a challenge, especially because it is often taught without visual aids.

In this guide, we unpack the various components of the theorem and provide a basic overview of how it works – and with illustrations to help. Three scenarios – the flu, breathalyzer tests, and peacekeeping – are used throughout the booklet to teach how problems involving Bayes Theorem can be approached and solved.

Over 60 hand-drawn visuals are included throughout to help you work through each problem as you learn by example. The illustrations are simple, hand-drawn, and in black and white.

For those interested, we have also included sections typically not found in other beginner guides to Bayes Rule. These include:

  • A short tutorial on how to understand problem scenarios and find P(B), P(A), and P(B|A). For many people, knowing how to approach scenarios and break them apart can be daunting. In this booklet, we provide a quick step-by-step reference on how to confidently understand scenarios.
  • A few examples of how to think like a Bayesian in everyday life. Bayes Rule might seem somewhat abstract, but it can be applied to many areas of life and help you make better decisions. It is a great tool that can help you with critical thinking, problem-solving, and dealing with the gray areas of life.
  • A concise history of Bayes Rule. Bayes Theorem has a fascinating 200+ year history, and we have summed it up for you in this booklet. From its discovery in the 1700’s to its being used to break the German’s Enigma Code during World War 2, its tale is quite phenomenal.
  • Fascinating real-life stories on how Bayes formula is used in everyday life.From search and rescue to spam filtering and driverless cars, Bayes is used in many areas of modern day life. We have summed up 3 examples for you and provided an example of how Bayes could be used.
  • An expanded definitions, notations, and proof sectionWe have included an expanded definitions and notations sections at the end of the booklet. In this section we define core terms more concretely, and also cover additional terms you might be confused about.
  • A recommended readings sectionFrom The Theory That Would Not Die to a few other books, there are a number of recommendations we have for further reading. Take a look!

If you are a visual learner and like to learn by example, this intuitive booklet might be a good fit for you. Bayesian statistics is an incredibly fascinating topic and likely touches your life every single day. It is a very important tool that is used in data analysis throughout a wide-range of industries – so take an easy dive into the theorem for yourself with a visual approach!


By | ai, bigdata, machinelearning

(This article was originally published at Gianluca Baio’s blog, and syndicated at StatsBlogs.)

In the grand tradition of all recent election times, I’ve decided to have a go and try and build a model that could predict the results of the upcoming snap general election in the UK. I’m sure there will be many more people having a go at this, from various perspectives and using different modelling approaches. Also, I will try very hard to not spend all of my time on this and so I have set out to develop a fairly simple (although, hopefully reasonable) model.

First off: the data. I think that since the announcement of the election, the pollsters have intensified the number of surveys; I have found already 5 national polls (two by Yougov, two by ICM and one by Opinium $-$ there may be more and I’m not claiming a systematic review/meta-analysis of the polls.

Arguably, this election will be mostly about Brexit: there surely will be other factors, but because this comes almost exactly a year after the referendum, it is a fair bet to suggest that how people felt and still feel about its outcome will also massively influence the election. Luckily, all the polls I have found do report data in terms of voting intention, broken up by Remain/Leave. So, I’m considering $P=8$ main political parties: Conservatives, Labour, UKIP, Liberal Democrats, SNP, Green, Plaid Cymru and “Others“. Also, for simplicity, I’m considering only England, Scotland and Wales $-$ this shouldn’t be a big problem, though, as in Northern Ireland elections are generally a “local affair”, with the mainstream parties not playing a significant role.

I also have available data on the results of both the 2015 election (by constituency and again, I’m only considering the $C=632$ constituencies in England, Scotland and Wales $-$ this leaves out the 18 Northern Irish constituencies) and the 2016 EU referendum. I had to do some work to align these two datasets, as the referendum did not consider the usual geographical resolution. I have mapped the voting areas used 2016 to the constituencies and have recorded the proportion of votes won by the $P$ parties in 2015, as well as the proportion of Remain vote in 2016.

For each observed poll $i=1,ldots,N_{polls}$, I modelled the observed data among “$L$eavers” as $$y^{L}_{i1},ldots,y^{L}_{iP} sim mbox{Multinomial}left(left(pi^{L}_{1},ldots,pi^{L}_{P}right),n^L_iright).$$ Similarly, the data observed for “ $R$emainers” are modelled as $$y^R_{i1},ldots,y^R_{iP} sim mbox{Multinomial}left(left(pi^R_{1},ldots,pi^R_Pright),n^R_iright).$$
In other words, I’m assuming that within the two groups of voters, there is a vector of underlying probabilities associated with each party ($pi^L_p$ and $pi^R_p$) that are pooled across the polls. $n^L_i$ and $n^R_i$ are the sample sizes of each poll for $L$ and $R$.

I used a fairly standard formulation and modelled $$pi^L_p=frac{phi^L_p}{sum_{p=1}^P phi^L_p} qquad mbox{and} qquad pi^R_p=frac{phi^R_p}{sum_{p=1}^P phi^R_p} $$ and then $$log phi^j_p = alpha_p + beta_p j$$ with $j=0,1$ to indicate $L$ and $R$, respectively. Again, using fairly standard modelling, I fix $alpha_1=beta_1=0$ to ensure identifiability and then model $alpha_2,ldots,alpha_P sim mbox{Normal}(0,sigma_alpha)$ and $beta_2,ldots,beta_P sim mbox{Normal}(0,sigma_beta)$.

This essentially fixes the “Tory effect” to 0 (if only I could really do that!…) and then models the effect of the other parties with respect to the baseline. Negative values for $alpha_p$ indicate that party $pneq 1$ is less likely to grab votes among leavers than the Tories; similarly positive values for $beta_p$ mean that party $p neq 1$ is more popular than the Tories among remainers. In particular, I have used some informative priors by defining the standard deviations $sigma_alpha=sigma_beta=log(1.5)$, to mean that it is unlikely to observe massive deviations (remember that $alpha_p$ and $beta_p$ are defined on the log scale).

I then use the estimated party- and EU result-specific probabilities to compute a “relative risk” with respect to the observed overall vote at the 2015 election $$rho^j_p = frac{pi^j_p}{pi^{15}_p},$$ which essentially estimates how much better (or worse) the parties are doing in comparison to the last election, among leavers and remainers. The reason I want these relative risks is because I can then distribute the information from the current polls and the EU referendum to each constituency $c=1,ldots,C$ by estimating the predicted share of votes at the next election as the mixture $$pi^{17}_{cp} = (1-gamma_c)pi^{15}_prho^L_p + gamma_c pi^{15}_prho^R_p,$$ where $gamma_c$ is the observed proportion of remain voters in constituency $c$.

Finally, I can simulate the next election by ensuring that in each constituency the $pi^{17}_{cp} $ sum to 1. I do this by drawing the vote shares as $hat{pi}^{17}_{cp} sim mbox{Dirichlet}(pi^{17}_1,ldots,pi^{17}_P)$.

In the end, for each constituency I have a distribution of election results, which I can use to determine the average outcome, as well as various measures of uncertainty. So in a nutshell, this model is all about i) re-proportioning the 2015 and 2017 votes based on the polls; and ii) propagating uncertainty in the various inputs.

I’ll update this model as more polls become available $-$ one extra issue then will be about discounting older polls (something like what Roberto did here and here, but I think I’ll keep things easy for this). For now, I’ve run my model for the 5 polls I mentioned earlier and this is the (rather depressing) result.

From the current data and the modelling assumption, this looks like the Tories are indeed on course for a landslide victory $-$ my results are also kind of in line with other predictions (eg here). The model here may be flattering to the Lib Dems $-$ the polls seem to indicate almost unanimously that they will be doing very well in areas of a strong Remain persuasion, which means that the model predicts they will gain many seats, particularly where the 2015 election was won with a little margin (and often they leapfrog Labour to the first place).

The following table shows the predicted “swings” $-$ who’s stealing votes from whom:

Conservative Green Labour Lib Dem PCY SNP
Conservative 325 0 0 5 0 0
Green 0 1 0 0 0 0
Labour 64 0 160 6 1 1
Liberal Democrat 0 0 0 9 0 0
Plaid Cymru 0 0 0 0 3 0
Scottish National Party 1 0 0 5 0 50
UKIP 1 0 0 0 0 0

Again, at the moment, bad day at the office for Labour who fails to win a single new seat, while losing over 60 to the Tories, 6 to the Lib Dems, 1 to Plaid Cymru in Wales and 1 to the SNP (which would mean Labour completely erased from Scotland). UKIP is also predicted to lose their only seat $-$ but again, this seems a likely outcome.

Please comment on the article here: Gianluca Baio’s blog

The post Snap appeared first on All About Statistics.

Source link