I have been offered a great PhD student position in information theory and machine learning, but in my heart i want to pursue a PhD in pure mathematics, hence I am debating with myself whether or not I should take it. I am looking for advice primarily from mathematicians, and especially those that did not have a straight line path to a career in mathematics.
Some context is necessary. I have a background in engineering, with a B.Sc. in electrical engineering and an M.Sc. in engineering physics (with theoretical physics specialization). This is in Europe, and 3 years bachelor's plus 2 years master's is standard in my country. I graduated a couple of years ago, but I got into engineering quite late, having had an earlier career in music, so I am now in my mid thirties. Since graduation I have worked with signal processing and machine learning in a commercial R&D setting.
Ever since starting my engineering studies I have had a growing interest in mathematics, but it never quite felt practically feasible to pursue full time mathematics studies (recall that I started late; I also had to work part time throughout my studies). However, I did take a few pure mathematics courses like real analysis, abstract algebra, and discrete mathematics while at university. More recently I have started to read some mathematics in my free time (currently Lee's Introduction to Topological Manifolds), but progress is slow since I can only use evenings and weekends.
This spring I started applying to PhD student positions. Primarily in pure mathematics, but also a couple in theoretical aspects of machine learning and physics. I had low hopes for the mathematics positions though, since I just barely fulfilled the formal requirements, and indeed nothing came of those applications. But I did get offered a position at an electrical engineering department where, if I take it, I will be working with information theoretic analysis of machine learning algorithms.
As I see it I have two options:
Take the information theory PhD position. As far as electrical engineering subjects go, I think this is about as mathematical as it gets. I also know from my interviews that I would have a lot of freedom to take courses from the mathematics department as long as they are relevant to the project. Hence I should be able to take courses in measure theoretic probability theory, optimization, perhaps complex and functional analysis, and so on, with the mathematics students. But my research would be constrained to the main subject, and in the end my doctorate would be in electrical engineering.
Start a second master's in pure mathematics, and apply for math PhD positions again next year. The idea is to get more advanced mathematics credits under my belt, and then ideally to get a PhD student position in mathematics before finishing this second master's. But of course it might take the full two years (or longer) before I get anything, if I even get anything at all. With full time studies I believe I would be capable to get perfect or close to perfect grades. I have enough money saved to take a year off from work, but if it takes longer I may have to reduce the studies to part time.
Clearly option 1 is the rational one from a career perspective, but my heart wants to go with option 2. One big worry is my age, since option 2 will take at least one year extra, and, as mentioned earlier, I am already in my mid thirties. I expect that I will want to continue in academia after the PhD, but maybe such a late PhD in mathematics will make that difficult?
I guess my main question is, would it be moronic to go for option 2? I would also love to hear from people who have had similarly strange paths into a career in mathematics, if there are any on the site. What advice can you share?
Clarifications:
These are all fully funded positions that I am talking about, as is the norm in my country.
There are other good candidates lined up if I don't take the information theory position, so I would not be putting the advisor in a rough spot.
I have strong references in machine learning and theoretical physics. In particular I have previous mentors that are happy to write letters of recommendation for me. I think this was an important factor in me getting offered the information theory position.
I don't have any family relying on me economically.