text:
# I hate Electrical Engineering courses i have 2 left, need guidance!

• Courses
Hello everyone.

I'm currently a Jr. Computer Engineering student. Its funny, you don't really know what a computer engineer really does until your a Jr. and you've already put 2 years. Ever since I was young I loved to program. I always wanted to be a Software Engineer. So when I graduated Highschool I went to a school that offered Software Engineering.

I'm now at a school that doesn't offer software engineering but offers computer science. They are very similar but software engineering also has some business that CS doesn't have. For some reason I never wanted to be a Computer Scientist becuase it was alot of algorithm analsysi, and doing math proofs, it seems like a math major to me.

So I took up computer engineering because they can take the exact same courses as a CS but also can do hardware courses where a CS isn't allowed to take them or they can but it won't count towards anything but a general education credit, and they also have to take different maths/physics in order to do this.

So it seems like a CS is like a water downed version of a Computer Engineer. I took a circuit analysis class, with just linear devices and I did alright in it, just took a ton of studying.

But when I got to EE 310, which delt with diods, and non-linear devices i was completely lost. The people in the class were EE's and CE's and they loved it and it was so easy to them while I spent hours and hours trying to figure out 1 problem and failed to get it right. I soon found out I couldn't handle taking that class because i spent all day on it and got no where. So i dropped that class as well as EE317, signals and transforms and systems.

I also have tons of trouble with building a circuit and finding its voltage/current/etc, i have no hands on skills it seems.

But I do enjoy programming as long as it isn't recursion, which is another problem. I suck at recursion. If it isn't recursive I can do great, but i know to be a CS you must be good at all aspects, not just some. Thats another reason I went into Computer ENgineering.

If I understood circuits and how to analyzie a circuit (physically) not on paper, i can do it on paper fine, i would enjoy circuits and CE would really interest me. Because then I could get into robotics.

If i'm really terriable at circuit design, should I not be a Computer ENgineer?
Should I be a CS instead even though i suck at recursion and fall alseep when hearing about how many miliseconds this algorithm is faster than the other, blah.

Thanks!

Last edited:

## Answers and Replies

berkeman
Mentor
Have you written a compiler yet? That is one of the more challenging, hands-on programming classes, and it is a good test of whether you can handle and enjoy advanced programming. It sounds like you are headed towards pretty much a straight software career, which is fine. But if you also don't enjoy your compiler class, that may mean that the more complex programming assignments that you could get in the future may be too much for you. If you aced your class where you write a C compiler or whatever language compiler, then you are headed down the right path, IMO.

Thats the problem Berkeman, very little CS majors or CE majors will take that Compiler class because it is so advanced and complex. So they just don't take it. Its also not offered until your Senior year, which is alittle late if your going to change a major suddenly.

Thats what scares me, I got straight A's all the way up until now, well i have like a 3.9gpa. But that was all basic programming, like data structures etc. Now we are hitting the core classes and it seems like I can't cut it.

But my friend got an internship (he's a year ahead of me) he was worse at programming than me and he is doing great at his job, programming in java/C/ and somtimes assembly. He doesn't do any hardware at all becuase he didn't like the classses either but he got through them.

0rthodontist
mr_coffee said:
But I do enjoy programming as long as it isn't recursion, which is another problem. I suck at recursion. If it isn't recursive I can do great, but i know to be a CS you must be good at all aspects, not just some. Thats another reason I went into Computer ENgineering.
It's harder (in my opinion) to write recursively in a functional manner than iteratively, but it can be much neater and in the end once you figure out how to do something right you're more sure that you're correct. I don't think it's something you can decide that you "suck at." It's just a matter of learning. You can get by without thinking recursively in many courses and for many purposes, though it can help a lot especially in algorithms or related courses.

Sounds like your study habits worked fine until now. Maybe instead of questioning your major, you should look at how the people that are doing well are studying. I know that when I changed to EE from CS, I began to rely on other people much much more. I go to study groups, or start study groups, and try as hard as I can to always stay on the ball. I'm not saying that my study habits are amazing or anything, just that I had to change.

Thanks guys. I think I want to be a Computer Scientist...if I switch i will have to pick up a forgien language, take a 2nd part of calc III, and take 2 more stat classes ugh. But I might also loose alot of scholarship money...I also was accepted into alot of Engineering Honor societies. If I switch, computer science isn't considered engineering is it? And yet they have a major Software Engineering at a branch campus at Penn State but not at main campus.

FrogPad, I think I would like EE more if I knew how to build a circuit and use like a voltameter and osclascope to analzyise the voltage/current waves.

I got kind of screwed in the introduction to this course EE210, becuase I was the only person in the class, the lab was very weak and I really didn't learn anything hands on, but I got an A- in the class becuase i can analzyie the circuits fine on paper. What did you do to help you make that transitition from CS to EE?

Does anyone know how important it is to analzye a circuit and build ciruits like EE's do if your a CE? Do CE's mainly focus on digital design, rather than circuit design? Like more work with VHDL and Verilog rather than the hands on, testing voltage, etc?

I found it odd that they are only offered 3 EE coursees in the whole major, so if the case is I don't have to be super good in those EE courses and just get by then I would persue the CE degree. But I don't want to get in trouble in upper division classes, as well as out in the job market.

Ortho,

I also got this mind set that recursion is not used in the industry, because its so memory intensive and tons of overhead so it makes me want to not learn it even more but I know i have too becuase I found out alot of these classes invovle algortihms that invovle recursion, hopefully i can find a good book that explains it rather than giving a few examples using the factorial function and power function.

0rthodontist
I don't know about use in industry, but it doesn't involve that much overhead. If you're programming in a functional language, i.e. one designed to use recursion, the compiler optimizes away a lot of the function call overhead (in fact a function using tail recursion will be turned into a simple loop). Also, efficiency is not always or even usually a primary concern--more often the problem is first getting the program to work at all, then later optimizing the 10% of code that actually does need to be fast. By the way, some functions might be very slow to calculate using a certain kind of recursion--you may have seen a program involving the fibonacci numbers, for example, that couldn't seem to calculate the 100th one. Don't let that fool you; it's not overhead, just inefficient recursion, and you can get around it.

Why do you need a book on recursion? Do you not understand the basic concept, or do you just want to try more examples until you're more comfortable with it? Have you had a course in functional programming (lisp/haskell/etc)?

If you want to code: go to CS. On job interview they won't ask you whether you can or cannot connect circuit, they will ask (at kewl places like MS or Google) to write simple but algorithmic code and I'm positive that you will meet recursion there.

I also got this mind set that recursion is not used in the industry, because its so memory intensive and tons of overhead so it makes me want to not learn it even more but I know i have too becuase I found out alot of these classes invovle algortihms that invovle recursion, hopefully i can find a good book that explains it rather than giving a few examples using the factorial function and power function.
This depends on what area you want to go.

What I can say as programmer is that yes, recursion is used. Once you get to more complex concepts and tricks of C++ (like those in Alexandresku), recursion will be like a walk in the park -- you'll be doing template recursion (lottuva fun but mindblowing). But I doubt it is teached in any uni :)

If you suck at recursion and hate it, how can you possibly be a programmer? How can you possibly program at all? Sorry but it just sounds weird hearing "i don't like recursion" coming from something who wants program and possibly be a computer scientist. Have you not had any functional programming before? Recursion is close to (if not) the heart of computer science IMO.

Ortho, I haven’t taken any type of those courses. We had a C++ course, 2 semesters and I’m a jr. and that’s all the programming we had until jr. year which i find odd. They are now changing the curriculum and are doing the following:
C++ for 2 semesters
Java for 1 (UML/OOP)
C for 1 (Systems programming)
before your jr. year.

Which i think is a nice track I think. I'm thinking about retaking C++ (intermediate programming course) on data structures/recursion because i haven’t had this course in almost 3 years. Then take the Java class and C class. I realize this is going to set me back a lot but I'm also minoring in business so perhaps I can work them out.

I had to take a year off of school due to a car wreck which paralyzed me from the chest down. I'm learning to walk again at the same time as doing school so this is also affecting my ability to concentrate on my subjects. It makes school not seem as important as it did before, but the longer I stay out of school the harder its going to be to come back.

The reason I hate recursion is because I don't understand it. Its like anything, if you don't understand it you get frustrated and it makes you dislike the subject (for me anyways). But I enjoy programming still, I like debugging code and getting the program to work and looking at the finished product.

That’s why I have to figure out recursion. I'm not the only student who has had this problem, they wrote a book on how to think recursively to help people like me. Now i just have to e-mail the professor and ask him what it is.

I have troubles figuring out the base case, and then I also have problems even tracing through recursive code. I'm not sure when the function returns the value of its self or in what order it does. I probably just need a detailed trace of a function to help me visual this but I can't seem to find any in the books I’ve read.

Anyone know of any good websites that review recursion in C++? I feel the most comfortable with reading that code but any will do.

thanks!

You came to the right place. I've always wanted to practice my recursion explaining skills on someone.

You do know what function is in C++? Imagine it consists of three parts:

1. Stack -- where function plays with its own things that are allocated locally.
2. Body -- where all the calls are located.
3. Some place to store return and incoming values -- might be in stack but let's imagine it as a different place.

Now let's observe what happens at simple function like this:

int f(void)
{
return someFunc(3);
//basically two pseudo-assembler commands
//move_and_start someFunc(3) ;pseudo1
//grab_return_value_put_it_into_some_place_and_return_to_caller_function ;pseudo2
}

1. Place where someFunc is located is being found.
2. Constant "3" is placed into some predefined place where someFunc's body will understand it.
3. Place to return value is supplied.
4. Place to return led of processor is supplied.
5. Processor is led to beginning of the body of someFunc.
6. Processor returns to pseudo2

Now, what you should grasp is that specific predefined places where function store input/output values are created new for any new instance of program. So running instance of function is determined by location of it's stack.

Let's see what happens in recursive function for goodness' sake already!
Take any recursive function:

//increases any <10 value up to 10
void increaser(int x)
{
//x is copied to specific stack of, hmm, let's call it rb1
//I repeat again that code differs, body does not
if(x<10)
{
x++;
return increaser(x); //key moment
//pseudo1: call of increaser
//pseudo2: returning what came
}
return x;
}

It would be best thing to draw this but since we're in the WWW here, let's go with English sprache.
Let's say increaser was called with value of 8:

increaser(8);

This is what happens (watch carefully each step):

1. Specific stack of increaser is created and 8 is put there: increaser8
2. increaser8 observes 8 and sees that it less than 10.
3.1. increaser8 increases 8 on 1: running value becomes 9
3. increaser9 gives to new stack of increaser two values:
a) analogy of address of pseudo2 in first example, basically returning commands.
b) constant "9" to place where new stacks usually accept input values.

4. increaser9 is accepting two variables.
5. increaser9 checks that 9<10 and increases running value to 10.
6. increaser9 calls increaser10 with value of 10.
7. increaser10 checks 10<10 and finds out that it is false -- WATCH!
8. increaser10 puts 10 to some place where increaser9 would get it out.
9. increaser10 leads processor to increaser9:pseudo2
10.increaser9:pseudo2 does 8-9 to increaser8.
11.increaser8 (as was originally called by main()) returns 10 to main();
12. main returns some value to operating.

What you should understand is how functions pass and return values, once you grasped it, recursion becomes easy. Pass/return was hardest part for me when I learned about recursion.

And some common advice as a programmer. I thought that at least US unis teach practical programming but seems
like they do not. Before you graduate:

a) Find GOOD books on C++, STL and various libraries: Straustrup will go.
b) Choose some good open-source project on sourceforge.net or tigris.org and join it. I was running one but
don't have time now.
c) GET EXPERIENCE.

mr coffee, as you can see as above from chipset there are good people who are willing to help .

I understand you very well, I am a girl in EE and the program is very hard. But, do not give up, you will be fine in your CS major, and do not worry if you are behind just to let you know that in Yugoslavia it takes about 7 yrs to graduate from EE or CS program. And, think of students who came from another countries with no money, poor english language and they start their studies in their 30s and "one day" they (we) will be aOK.

Good luck!

mr_coffee said:
FrogPad, I think I would like EE more if I knew how to build a circuit and use like a voltameter and osclascope to analzyise the voltage/current waves.

I got kind of screwed in the introduction to this course EE210, becuase I was the only person in the class, the lab was very weak and I really didn't learn anything hands on, but I got an A- in the class becuase i can analzyie the circuits fine on paper. What did you do to help you make that transitition from CS to EE?

Well when I was CS I would spend a LOT of time alone working on coding projects. Part of our CS curriculum was an introductory class to logic design. The class was a weeder course, and was really designed to cut the people who couldn’t hack it out of the curriculum. It also happened to be an EE course.

So I took this class, and was like **** I don’t know if I can make it through this. I had a horrible math background, and the amount of effort that went into writing up the labs was just out of control. So I passed the class and moved back to the CS curriculum, data structures, programming languages, assembly, etc… I did fine in all those classes except for assembly. It was again an EE course that was just killing me with labs, and theory that I would understand, but it just took me friggen FOREVER to actually understand it. I just didn’t understand how people (after seeing exam distributions) would get 98’s or 96’s.

So I did the unthinkable for a CS student, I started asking people if they wanted to get together to study. Well, the people I asked happened to be two brothers that both got high 90’s on their exams. I began to work together with them, and we would just pound through the material together. It worked nicely because we all had our strengths and weaknesses. I was good with the code part of the material, and they were good with relating the material to the hardware, and electrical aspects.

I just realized that I’m writing a short novel here, because I’m really not even close to finishing what I was originally intending to say. Actually I’ll stop here and make another point. Use a checkup device on yourself. See how I just stopped myself from writing a book response to you. This is something I started doing now that I’ve progressed over to EE. I’ll constantly stop myself and be like, “is this a good use of my time?”, “is what I’m doing necessary?”

Anyways…. Back to my original thoughts. I just began to realize, that the people who did consistently well across all their courses, were the ones who were forming study groups, talking with the professors, and/or asking questions in class to clarify something in their notes. And typically those people were usually engineering students.

When I was CS, instead of simply asking someone for help, I would sit there for hours upon hours and try and figure something out. I would eventually get it, but it would take me a long time. If you simply go talk to your professor you can cut out those fruitless hours. It really does all come back to the interjection I made above. If you ask yourself, “is this a good use of my time?” after spending an hour trying to figure something out (that may or may not be in an exam), and the answer is no, then it might be time to ask a person in your class, get on PF, talk to the professor, etc..

So to answer your question, the main thing that changed from CS to EE was this inward to outward progression.

Well when I was CS I would spend a LOT of time alone working on coding projects. Part of our CS curriculum was an introductory class to logic design. The class was a weeder course, and was really designed to cut the people who couldn’t hack it out of the curriculum. It also happened to be an EE course.

So I took this class, and was like **** I don’t know if I can make it through this. I had a horrible math background, and the amount of effort that went into writing up the labs was just out of control. So I passed the class and moved back to the CS curriculum, data structures, programming languages, assembly, etc… I did fine in all those classes except for assembly. It was again an EE course that was just killing me with labs, and theory that I would understand, but it just took me friggen FOREVER to actually understand it. I just didn’t understand how people (after seeing exam distributions) would get 98’s or 96’s.

So I did the unthinkable for a CS student, I started asking people if they wanted to get together to study. Well, the people I asked happened to be two brothers that both got high 90’s on their exams. I began to work together with them, and we would just pound through the material together. It worked nicely because we all had our strengths and weaknesses. I was good with the code part of the material, and they were good with relating the material to the hardware, and electrical aspects.

I just realized that I’m writing a short novel here, because I’m really not even close to finishing what I was originally intending to say. Actually I’ll stop here and make another point. Use a checkup device on yourself. See how I just stopped myself from writing a book response to you. This is something I started doing now that I’ve progressed over to EE. I’ll constantly stop myself and be like, “is this a good use of my time?”, “is what I’m doing necessary?”

Anyways…. Back to my original thoughts. I just began to realize, that the people who did consistently well across all their courses, were the ones who were forming study groups, talking with the professors, and/or asking questions in class to clarify something in their notes. And typically those people were usually engineering students.

When I was CS, instead of simply asking someone for help, I would sit there for hours upon hours and try and figure something out. I would eventually get it, but it would take me a long time. If you simply go talk to your professor you can cut out those fruitless hours. It really does all come back to the interjection I made above. If you ask yourself, “is this a good use of my time?” after spending an hour trying to figure something out (that may or may not be in an exam), and the answer is no, then it might be time to ask a person in your class, get on PF, talk to the professor, etc..

So to answer your question, the main thing that changed from CS to EE was this inward to outward progression.

I agree with this. While it is great to figure things out on your own (good exercise for your brain) if you're spending 4 or more hours on a single problem or concept then you just need to go get help.

0rthodontist
leright said:
I agree with this. While it is great to figure things out on your own (good exercise for your brain) if you're spending 4 or more hours on a single problem or concept then you just need to go get help.
Not in my opinion! The problems that you spend 4 hours or more on are the best ones, and solving these will teach you problem solving skills the best. If you go to the professor for a hint then you lose that. This week I spent 2 days on a single problem, probably 8 hours all told, and I'm glad I did!

0rthodontist said:
Not in my opinion! The problems that you spend 4 hours or more on are the best ones, and solving these will teach you problem solving skills the best. If you go to the professor for a hint then you lose that. This week I spent 2 days on a single problem, probably 8 hours all told, and I'm glad I did!

There's often too much work to do and you can't waste too much time. Spending 4 hours is long enough on a challenging problem. 8 is way too many. Staring at a piece of paper for 8 hours trying to solve a problem means there's something simple you need to solve the problem that you don't understand.

leright said:
There's often too much work to do and you can't waste too much time. Spending 4 hours is long enough on a challenging problem. 8 is way too many. Staring at a piece of paper for 8 hours trying to solve a problem means there's something simple you need to solve the problem that you don't understand.

I agree. If it was for only one class that is a different story. But most engineering students are taking several classes so obviously you can't do this for all classes.

0rthodontist
leright said:
There's often too much work to do and you can't waste too much time. Spending 4 hours is long enough on a challenging problem. 8 is way too many. Staring at a piece of paper for 8 hours trying to solve a problem means there's something simple you need to solve the problem that you don't understand.
No, it may mean that the problem is just tricky. This particular problem was to show that in an abelian group with cyclic subgroups of order 14 and 10, there is a cyclic subgroup of order 70. I was tired, which may have something to do with it, but in the end the way I solved it was experimenting with Z70 using haskell to find possible generators. It turns out that if a and b are the generators of the subgroups of order 10 and 14, you don't want ab, or a-1b, you want a2b. Not a problem of not understanding something, as writing the proof once I got a2b only took me a short time, just a matter of doing it the right way. And now, if I had a problem anything like that again, I'd know exactly what to look for. Frequently I get problems that take me a few hours and they are the ones I enjoy and learn the most from.

It's not the only class I'm taking--in fact I had a test in another class the day the problem was due, as well as a troublesome hardware installation that took a few hours--but you can always make time. It's just a matter of being motivated. Challenging homework problems should be motivating.

Last edited:
0rthodontist said:
No, it may mean that the problem is just tricky. This particular problem was to show that in an abelian group with cyclic subgroups of order 14 and 10, there is a cyclic subgroup of order 70. I was tired, which may have something to do with it, but in the end the way I solved it was experimenting with Z70 using haskell to find possible generators. It turns out that if a and b are the generators of the subgroups of order 10 and 14, you don't want ab, or a-1b, you want a2b. Not a problem of not understanding something, as writing the proof once I got a2b only took me a short time, just a matter of doing it the right way. And now, if I had a problem anything like that again, I'd know exactly what to look for. Frequently I get problems that take me a few hours and they are the ones I enjoy and learn the most from.

It's not the only class I'm taking--in fact I had a test in another class the day the problem was due, as well as a troublesome hardware installation that took a few hours--but you can always make time. It's just a matter of being motivated. Challenging homework problems should be motivating.

Well, fair enough. For me, if I have to think about a problem for more than 4 hours and can't think of how to do it then I just go to someone for help. 4 hours is a very long period of time. Maybe this is just because of the differences in the nature of the engineering curriculum and the math curriculum....in engineering, there's a large amount of work to do (lab reports, design projects, etc) and there's not enough time to spend 8 hours thinking about a single problem. I don't see anything wrong with asking for some help after spending 4 hours on something. I have an ego, but not THAT much of an ego.

And yes, chellenging problems are motivating, but if it takes you 4 hours to work one problem then your thought process or understanding is lacking and you should get some help.

Now, it's great to think about concepts and whatnot for more than 4 hours, to spend over 4 hours on a single problem seems excessive if it's just a textbook problem. However, if it's a complicated engineering project or something then it isn't out of the ordinary to spend weeks or months on a project.

Last edited:
0rthodontist
mr_coffee said:
Ortho, I haven’t taken any type of those courses. We had a C++ course, 2 semesters and I’m a jr. and that’s all the programming we had until jr. year which i find odd. They are now changing the curriculum and are doing the following:
C++ for 2 semesters
Java for 1 (UML/OOP)
C for 1 (Systems programming)
before your jr. year.

Which i think is a nice track I think. I'm thinking about retaking C++ (intermediate programming course) on data structures/recursion because i haven’t had this course in almost 3 years. Then take the Java class and C class. I realize this is going to set me back a lot but I'm also minoring in business so perhaps I can work them out.

I had to take a year off of school due to a car wreck which paralyzed me from the chest down. I'm learning to walk again at the same time as doing school so this is also affecting my ability to concentrate on my subjects. It makes school not seem as important as it did before, but the longer I stay out of school the harder its going to be to come back.

The reason I hate recursion is because I don't understand it. Its like anything, if you don't understand it you get frustrated and it makes you dislike the subject (for me anyways). But I enjoy programming still, I like debugging code and getting the program to work and looking at the finished product.

That’s why I have to figure out recursion. I'm not the only student who has had this problem, they wrote a book on how to think recursively to help people like me. Now i just have to e-mail the professor and ask him what it is.

I have troubles figuring out the base case, and then I also have problems even tracing through recursive code. I'm not sure when the function returns the value of its self or in what order it does. I probably just need a detailed trace of a function to help me visual this but I can't seem to find any in the books I’ve read.

Anyone know of any good websites that review recursion in C++? I feel the most comfortable with reading that code but any will do.

thanks!
Well, Chipset has given you one explanation of it from a hardware perspective. I've read that a hardware view can help some people understand recursion, though it's never done much for me (but I learned about recursion before I learned about hardware).

Loosely speaking, recursion allows you to calculate the value of some function, based on some other values of the function. For example you could say
f(n) = f(n-1) + f(n-2)
Here you want to calculate the value of f(n) based on the values of f(n-1) and f(n-2). If you knew f(n-1) and f(n-2), you could easily calculate f(n). Think of them as mathematical functions rather than as program snippets--f takes in a value n, and it returns a value, and does nothing else. f(n) is just a piece of data, as is f(n-1) and f(n-2).

However, calculating f(n) by drawing on f(n-1) and f(n-2) doesn't quite work. When you start calculating f, you generate requests for other values of f--at first you generate f(n-1) and f(n-2), but these will generate requests for other values of the function. Your base cases must ensure that all of these requests eventually get answered definitively. In this case, each time you call the function at a value k you ask for the values of the function at the values k-1 and k-2. So if you tell the compiler what the function evaluates to at two consecutive values (that are less than n), the recursion can't "jump past" them; it has to stop there. Whereas if you told it what the function evaluates to at just one value, say you tell it f(1) = 1, then when it tries to calculate f(2) it will ask for f(1) and also f(0). But it won't know f(0) and your program will run forever looking at f(-1), f(-2), etc. never getting an answer to work with. Your base cases have to act like a safety net or a wall that stops the recursion short and gives it a clear answer. One way to do it is

f(1) = 1
f(2) = 1
f(n) = f(n-1) + f(n-2)

This is valid haskell. Then in the haskell interpreter,
Prelude> f(7)
13

(this is actually pretty inefficient, a problem which can be solved with memoization)

You might look at
http://personal.vsnl.com/erwin/recursion.htm
http://www-128.ibm.com/developerworks/library/l-recurs.html?ca=dnt-624
http://www.cprogramming.com/tutorial/lesson16.html

Last edited by a moderator:
Thanks for the help guys!!

Also thanks for taking the time fo wrtie out examples, they seem to make alittle more sense to me but i'm going to go over them agian after my exams are over this week.

chroot
Staff Emeritus
Gold Member
mr_coffee,

While I can certainly appreciate that you enjoy the creative, free-wheeling side of computer programming -- like spending a couple of days dashing off a simple prototype in a high-level language like Python -- it is an unfortunate truth that most serious projects require a much deeper understanding.

For example, a general principle of computer programming is that 20% of your code consumes 80% of your CPU time. If you are unwilling or unable to sit through the deep, perhaps "painful" experience of optimizing that 20% to eke out every last millisecond of efficiency, you can only aspire to be an entry-level "code grunt" with no real responsibillity.

If the more thorough, theoretical (and imporant!) parts of CS seem very dull or painful to you now, I can only give you a piece of advice that has been proven true again and again in my life: subjects become exponentially more interesting once you really dig into them. I used to think certain fields -- say, computational fluid dynamics -- were just impossibly boring. And then I was "forced" to actually begin using it, and discovered that it's actually deep and fascinating.

You are perhaps just trying to avoid the small, difficult parts because they are difficult, but that attitude will prevent you from ever seeing an entirely different level of "beauty" that transcends the formatting of your source code. The difficult parts are where the real magic, wizardry, and elegance are to be found.

I suggest you take a look at the quicksort algorithm -- there is no more ubiquitous implementation of recursion -- and start working through example sorts with pen and paper until you really understand every single feature of the algorithm. It'll take you, at most, a couple of days, and it will probably ward off all the fears you have of the deep.

- Warren

chroot
Staff Emeritus
Gold Member
I have to object to this statement:

Tony11235 said:
Recursion is close to (if not) the heart of computer science IMO.

Recursion is best left for those situations where no other solution exists. The very fact that recursion is hard to follow and hard to get just right means an algorithm should not be coded recursively unless there's really just no better way to do it.

I have come across perhaps five situations in my entire programming experience (going on 15 years now) that demanded recursion. It's an interesting academic subject, but you'll want to use it very sparingly in industrial applications.

- Warren

0rthodontist
If you want to try quicksort, there's no simpler way to look at it than haskell:
quicksort (x:xs) = quicksort [a | a <- xs, a <= x] ++ [x] ++ quicksort [a | a <- xs, a > x]
quicksort [] = []
Read, "quicksort of the head of a list, x, followed by the rest of the list, xs, is the quicksorted list of all elements of xs that are less than or equal to x, followed by x, followed by the quicksorted list of all elements of xs that are greater than x. Also, quicksort of an empty list is the empty list."

Here's a couple of examples I wrote a few days ago when you were asking about powersets
Code:
pwrset [] = [[]]
pwrset (x:xs) = pwr ++ map (x:) pwr where
pwr = pwrset xs

cartesianx (a:as) xs = map (\x -> (a, x)) xs ++ cartesianx as xs
cartesianx _ _ = []
Read, "the powerset of an empty list is a list containing the empty list. The powerset of the head of a list x followed by the rest of the list xs, is the powerset of xs followed by the list whose elements are the elements of the powerset of xs, each appended to x."
Read the second one as, "the cartesian product of the head of a list, a, and the rest of the list, as, with another list xs, is the list of all ordered pairs (a, x) where x is in xs, followed by the cartesian product of as with xs. The cartesian product of anything else with anything else is the empty list."

Thanks guys i will take a look at those and thanks for the info chroot. I'm infact going to retake, Intermediate programming and data structures, then go onto java OOP programming and then hit up systems programming in C. Then come back to these higher level courses (compiler construction, operating systems, computer graphics, AI, etc) and I bet it will make a whole lot more sense and i'll be able to enjoy it more rather than rushing through college in hope to graduate in 4 years.

Taking that 2 year break really put me out of the mind set of programming, but i think its good in a way becuase now I know i will need to realy focus and absorb recursion and not just hope it hits me one day.

Its true, I must embrace all of what CS has to offer and not just ignore somthing I don't understand and write it off.

Thanks for the advice everyone! ;)


text:
Chapter 7

Some of the most common tests performed on patients are the procurement of tissue or body fluids for direct detection of pathogenic organisms to prove or disprove the presence of infection. The results of these tests are critical in guiding the selection of antibiotics for targeted therapy. The following clinical microbiology principles must be considered.

### Severity or Degree of Risk:

There is a difference between an otherwise healthy patient with a complaint of dysuria consistent with a UTI versus a patient with neutropenia and a high fever. The first needs a simple urinalysis with a routine bacterial culture. The second needs a “pan” culture (as in the prefix “pan-,” meaning “all” or “every”), which includes a pair of blood cultures, urinalysis with culture and sensitivity, sputum sample if a productive cough is present), and a chest x-ray to rule out pneumonia. The second patient also needs prompt treatment with empiric broad-spectrum antibiotics because she is at high risk of septicemia and death.

### Broad Coverage with Empiric Antibiotics:

Initiation of antibiotics that broadly cover a newly recognized infection in a timely and appropriate manner often is lifesaving. Selecting the wrong antibiotic, the wrong dose, an improper route, or delaying treatment, however, can increase morbidity and mortality.

### Timing:

Whenever feasible, specimens should be obtained and cultures performed before antibiotics are started. However, antibiotics should never be delayed in the face of a possible life-threatening infection, such as meningitis. After the culture data become available, antibiotic therapy can be narrowed or “de-escalated” to the antibiogram of the recovered organism.

### Source Control:

Collections of pus and infected fluids such as abscesses and empyema must be drained if at all possible. Failure to drain pockets of infection can compromise the outcome. The classic example is necrotizing fasciitis, which is a surgical emergency. Without surgery, mortality approaches 100%.

### True Infection versus Contamination and Colonization:

True infection is almost always accompanied by inflammation, usually marked by the presence of neutrophils in clinical specimens (absent in neutropenia) and clinical signs and symptoms. The presence of a large number of epithelial cells in a sample or the growth of normal skin flora often signifies contamination and colonization secondary to improper collection of specimens, although there are exceptions.

### Antimicrobial Resistance:

Drug resistance is a serious problem in modern medicine. In the past medicine stayed ahead of antimicrobial resistance with the development of new antibiotics to overcome new resistance patterns. Now, as vancomycin-resistant enterococci spread throughout the health care system and new clones of methicillin-resistant Staphylococcus aureus become more prevalent, antibiotic resistance is minimized only through proper antibiotic stewardship. To this end the CDC has launched a 12-step program for preventing antimicrobial resistance in hospitals.

Save Table | Print
CDC ...

Sign in to your MyAccess Account while you are actively authenticated on this website via your institution (you will be able to tell by looking in the top right corner of any page – if you see your institution’s name, you are authenticated). You will then be able to access your institute’s content/subscription for 90 days from any location, after which you must repeat this process for continued access.

Ok

## Subscription Options

### AccessMedicine Full Site: One-Year Subscription

Connect to the full suite of AccessMedicine content and resources including more than 250 examination and procedural videos, patient safety modules, an extensive drug database, Q&A, Case Files, and more.

format: plain


text:
Please use this identifier to cite or link to this item: http://arks.princeton.edu/ark:/88435/dsp016395w953s
 Title: A PHYSIOLOGICAL APPROACH TO DETERMINING ECOSYSTEM PRODUCTIVITY IN THE ARCTIC Authors: Vasquez, Ethan Advisors: Bender, Michael Contributors: Gauthier, Paul Department: Geosciences Class Year: 2016 Abstract: In recent decades the Arctic has been warming at a rate of almost twice the global average and this has led to changes in the composition, density, and distribution of arctic vegetation. These changes will have strong influences on the region’s net carbon (C) exchange between land and atmosphere and hold significant implications for future atmospheric [CO2]. However, the precise nature of arctic vegetation change under future warming is not well constrained, highlighting the need for a better understanding of how arctic plants will respond to climate change. In this study, we investigated four key plant mechanisms in Betula pubescens ssp. tortusa: 1) Gross photosynthesis (GOP), 2) Respiration, 3) Rubisco carboxylation (Vc) and oxygenation (Vo), and 4) Mesophyll conductance (gm). Experiments were conducted under varying light intensity and [O2]. For the analysis we utilized a novel method for measuring leaf photosynthesis and respiration that relies on 18O-labelled water, which to the best of our knowledge has never been applied to terrestrial plants, and the measurements collected have not been conducted in this arctic species before. GOP was measured at 10.84 ± 2.11 μmol m-2 s-1 and Vc /Vo was approximately 0.5 for all examined lightintensities. For all [O2] we found that respiration in the light (RLight) was lower than dark respiration (RDark), indicating that respiration is inhibited in the light. The response of gm was shown to increase with increasing light intensity and decrease with decreasing [O2]. Measurements collected agreed with both previous studies and theoretical approximations, which demonstrates that this O2 method is a reliable method of measurement for a wide range of leaf processes. This study is a great development in our understanding of arctic plants, and the unique responses identified in Betula pubescens ssp. tortusa underscore the importance of expanding these measurements to characterize other arctic species. Extent: 63 pages URI: http://arks.princeton.edu/ark:/88435/dsp016395w953s Type of Material: Princeton University Senior Theses Language: en_US Appears in Collections: Geosciences, 1929-2019

Files in This Item:
File SizeFormat


text:
The top ten things that math probability says about the real world

by David Aldous.

Talk given at Cornell University, April 14 2008. Like most scientists, I habitually just write slides and extemporize the actual spoken words. For this one talk I wrote the following script, though (being hard to break the habits of 30 years) I didn't stick closely to the script. Each link is one slide.

Every academic discipline has its own peculiarities, and let me start by pointing out a peculiarity that my own topic (math probability) inherits from its parent mathematics. Just about every University offers an undergraduate course in math probability, and as a student in such a course what you actually do is about 100 homework problem of this kind. The top ones are just math" without any attempt at a real-world explanation, and the bottom two are weird made-up stories (poisonous mushrooms and car mufflers) referring to real-world items but not attempting to be empirically realistic. If you come from say Medieval History, you might think I've chosen some extreme example, but (alas!) different textbooks differ only in the the relative proportions of these two genres.

Why is this peculiar? Let's take some other discipline, say Evolutionary Biology (which I have an amateur interest in). There's a similarity between math probability and Evolutionary Biology; in relation to their parent disciplines, there's a substantial body of popular science" literature. On my homepage I maintain a list on non-technical books relating to probability -- 50 or so books in different categories. One could make a similar list of popular books on Evolutionary Biology or 19'th century American History. For those subjects, I'm pretty sure there's a considerable overlap between what's done in popular books and what's done in an undergraduate course -- in both contexts, surely one should start by deciding what's important and interesting, and then talk about it. But in math probability there's an almost complete disconnect between what we teach undergraduates and what writers of popular books think is important and interesting. What we teach is technique -- and you learn technique in math just like you learn it in tennis or oil painting, by spending time doing it yourself. Of course I've nothing against learning technique, but it's peculiar that we just teach technique. To give an analogy, reconstructing evolutionary trees from fossils often reduces to minute study of fossil teeth and a professional paleontologist needs to learn this, but it would be odd to emphasize it in a first undergraduate course.

So here is my manifesto. What's interested me for a while is: in at least some undergrad math probability courses, can we try to focus less on technique and more on what theory actually says, in the sense of predictions for the real world? I've tried to do this both in freshman seminar courses and in a junior-senior seminar course. And you then realize it's hard to do -- it's just hard to decide what's actually important. So I finally forced myself to compose a top 10 list -- and here it is.

At least, here are 6 of them. These are the ones I'm not going to talk about, except briefly now.

Opinion polls, like airplanes, actually work rather well -- they only get into the news when things go wrong. I'm using opinion polls as a proxy for other textbook concepts like randomized controlled experiments -- we really do know how to determine whether medical drugs work, but again the subject only gets into the news when things go wrong.

Separating skill from luck in the aggregate is one conceptual aspect of the regression effect. The 5 baseball teams with best records in 2007 were Boston, NY Yankees, LA, Cleveland and Arizona. Without knowing anything about baseball, one could confidently bet that at least 3 of these 5 will have worse records in 2008 than in 2007. As a predictable statistical effect -- part of their success was chance.

The Ludic Fallacy is a cute neologism (by Nassim Nicholas Taleb, about whom more later) for thinking that most real-world uncertainty is analogous to simple games of chance -- mostly it's not.

Injecting randomness refers to game theory; in a football game, the offense doesn't want opponents to know whether they're doing a passing or running play, so they implicitly put some randomness into the choice.

The fact that most letter strings JQTOMXDW KKYSC have no meaning is what makes most simple letter substitution ciphers easy to break. In a hypothetical language in which every "monkeys on typewriters" string had a meaning, a letter substitution cipher would be impossible to break, because each of the 26 x 25 x 24 x .... x 2 possible decodings might be the true message. Now if you want to transmit or store information efficiently, you want every string to be possible as a coded string of some message (otherwise you're wasting an opportunity) and indeed you ideally want every string to be equally likely as the coded string of some message. This is "coding for efficiency", but with such an ideal public code one could just apply a private letter substitution cipher and get an unbreakable "code for secrecy".

The final item is more frivolous. Genetics is one of the classic application of probability but rather than attempting to say anything portentious about Evolution, here's a down home calculation. You have 2 parents, 4 grandparents, 8 great-grandparents, and back 10 generations you have somewhat less that 1,024 ancestors (not all different). How many have you actually inherited DNA from? Under a common simplified model, about 370. Less than half. So even if you can prove that one of your ancestors was a relative of King George III, this doesn't mean you have royal blood.

Here are the 4 topics I will talk about today. Note that only 2 or 3 are these 10 ideas are treated in a typical undergrad course. Let's jump into the first topic:

Coincidences are more likely than you think.

Here's a textbook item. The famous birthday paradox says: with 23 people in a room, there's about a 50% chance that some two people have the same birthday. There's nothing magic about 23. For any number of people there's a formula for the chance of some shared birthday, it just turns out that to make this chance be 50% you need 23.

That's a math prediction; and you can check how well it works with e.g. baseball teams. I get kids to do this in a freshman seminar, but of course you could get elementary school kids to do it just as well. Baseball team rosters are easy to find online, and happen to have players birthdays, and happen to have about 25 players on an active roster. This is today's Toronto Blue Jays roster, and indeed we see two players -- Jeremy Accardo at the top and Vernon Wells second from bottom -- with the same birthday, December 8th.

This is a setting where you can check that math theory works -- the prediction is that slightly more than half the baseball teams have two players with the same birthday, and every time I've checked it, it works. But it's a long way away from the kind of real-life coincidences that people find striking. As illustrated by this sign one sometimes sees on church signboards, there's a long tradition outside mainstream science of assigning spiritual or paranormal significance to coincidences, by relating stories and implicitly or explicitly asserting that the observed coincidences are immensely too unlikely to be explicable as just chance".

Rationalists dispute this, firstly by pointing out that (as illustrated by the birthday paradox) untrained intuition about probabilities of coincidences is unreliable, and secondly by asserting that observing events with a priori chances of one in a gazillion is not surprising because there are a gazillion possible other such events which might have occurred but didn't. In other words, it's not surprising when {\bf somebody} wins the lottery, because there are millions of people who didn't.

I'm on the rationalist side, but must admit that they've never provided actually evidence that interesting real-life coincidence occur no more often than "pure chance" predicts. That is, rationalists are stuck in the playground "oh no they're not" mode rather than offering empirical evidence. Their difficulty is that the sort of things that mathematicians can make predictions for, are what I call "small universe" models (like the birthday paradox) where we specify in advance what coincidences might happen.

If we want to take one step toward real-life coincidences, I think we should pay attention to three features of real-life coincidences:

(i) coincidences are judged subjectively -- different people will make different judgements;
(ii) if there really are gazillions of possible coincidences, then we're not going to be able to specify them all in advance -- we just recognize them as they happen;
(iii) what constitutes a coincidence between two events depends very much on the concrete nature of the events. The birthday paradox has nothing mathematically to do with birthdays -- if there were 365 equally common hair colors the answer would be the same.

Here's my attempt to study a setting with these three features. Alas this will mark me as a complete nerd. Let me seek some reassurance that I'm not the only complete nerd here, by asking for a show of hands on the following question. Be honest now

• Have you ever spent more than 2 minutes clicking on the Wikipedia "random article" link?
Click long enough, you see an article that is similar in some coincidental way to a previous article in the same session. So I did an experiment; on 28 different days I clicked and read until noticing some unusual similarity between the current article and some previous one that day; then I wrote down both the article titles and a brief description of the "specific coincidence" observed. Here are the results.

Of course Wikipedia isn't exactly "real life" but it does have the 3 essential features mentioned before, and also what I'm doing is a "repeatable experiment" -- we can actually do science here. In particular, after seeing a specific coincidence one can go back and interrogate Wikipedia to calculate the a priori chance of seeing that coincidence in two random pages. For instance if you click "random article" twice, the chance both pages are Hindu religious figures is about 12 in 100 million.

This data helps us focus on the gazillions" argument. We do see unlikely coincidences -- figures are per 100 million".

If you repeated the experiment then almost all your 28 coincidences would be different from my 28. On the other hand with a lot of work (in progress with undergraduates) one can go up from specific coincidences to coincidence types" -- "people with similar occupations" -- in the table we see (aside from sports people and historical people) country music singers, children's lit authors, College Presidents, filmmakers. We can learn from examples and think exhaustively of other occupations, to estimate the chances of unseen coincidences of this general type. We hope to identify maybe 1/2 or 2/3 of "coincidence space", and in this way check the rationalist assertion. Of course Wikipedia is another "small universe" which won't impress spiritualists, but it's a step in an interesting direction.

100% Kelly strategy marks the boundary between aggressive and insane investing.

In an old joke, two men are running, pursued by a grizzly bear. One turns to the other and says "why are we running -- we can't outrun the bear!". The other replies: "I don't need to outrun the bear, I just need to outrun you!".

This thought applies to gambling (on horse races or football games, say) and to stock market type investments; you don't need a crystal ball that says what's going to happen, you just need to know the probabilities, and indeed you don't need to know probabilities exactly, you just need to know them better than other people.

Talking about the general topic of finance, risks, investments carefully requires some prior discussion of issues like utility functions and risk aversion. The issue is: compare in your mind the prospects of gaining $250 or losing$250. If your net worth is say $500,000 the$250 is so small that you should regard these as equal and opposite. That is, it's irrational to be risk-averse with small amounts. On the other hand with $250,000 it's perfectly rational to be more worried about the risk of losing half your wealth. In fact people are predictably irrational in such matters, which is a different item on our top 10 list -- for instance the majority of affluent Americans have irrationally small insurance deductibles -- they're paying for something they don't need -- but here I'll stick to rationality. I'll talk about long-term investment-- imagine you fortunately inherit a sum of money at age 25 and you resolve to invest it and not start spending it until age 65. Here compounding plays a substantial role; if you could get a fixed real interest rate of 7% and ignore taxes, then the "rule of 70" says you money will double in 10 years and so double 4 times -- that is grow to 16 times the original -- over a 40 year period. What I'll talk about -- the Kelly criterion -- envisages a particular setting. (i) You always have a choice between a safe investment (pays interest, no risk) and a variety of risky investments (suppose we know the probabilities of the outcomes of these investments). (Of course in practice we don't know probabilities, so need to use our best guess instead.) (ii) Fixed time period -- imagine a year, could be month or a day -- at end you take you gains/losses and start again with whatever you've got at that time ("rebalancing"). The Kelly criterion gives you an explicit rule for how to divide your investments to maximize long-term growth rate. We can say the formula in an undergraduate class, but the conceptual point is rarely emphasized. To illustrate, short-term fluctuations of stock prices are "purely random" to first order, but quantitatively inclined speculators pore over data seeking non-randomness to exploit; suppose you've found such scheme, and we'll invent some numbers. Here's the model. Each day there's a bet: 51% chance to double money 49% chance to lose all money. Looks good -- expected gain 2% per day -- but you don't want to risk all your money on one day. Instead use strategy: bet fixed proportion p of your capital each day. Theory says: the long-term growth rate depends on p, but in an unexpected way. • Optimal strategy is to bet p = 2% of your capital each day; this provides growth rate 2/10,000 per day, which (250 trading days per year) becomes 5% per year. If you're timid and bet a smaller amount, then your growth rate will be smaller. More surprisingly, if you're too aggressive, and bet a larger proportion, then your growth rate goes down too. If you consistently bet more than 4% each day you'ld lose money in the long run. Greed isn't good here. Part of the explanation is asymmetry of investing all your money: a gain of 50% followed by a loss 50% works out as a 25% loss. This 5% looks small -- you could get that in a bank -- but we're only betting a small proportion of our money so we can keep the rest in the bank, so we're getting "5% above the risk free interest rate". The math above depends on hypothetical assumptions -- but completely generally the Kelly criterion says how to divide your portfolio between different investments. The numbers for growth rates that come out of the formula of course depend on the numbers you put in, but there's one aspect which is "universal". In any situation where there are sensible risky investments, following the Kelly strategy means that you accept a short-term risk which is always of the same format: 50% chance that at some time your wealth will drop to only 50% of what it you started with. Here the percents match up: 10% chance that at some time your wealth will drop to only 10% of what it you started with. It's OK to be uncomfortable with this level of risk and to be less aggressive -- get less long-term growth but with less short-term volatility. This is a matter of personal taste, like$3 latte vs $1 cup of joe. The universality above is remarkable, but there's something more subtle here that in a sense is even more remarkable. One can make a rather loose analogy with the light speed barrier. Common sense says objects can be stationary or more slowly or most fast or move very fast, and that there should be no theoretical limit to speed -- but physics says in fact you can't go faster than the speed of light. And that's a very non-obvious fact. Similarly, we know there are risk-free investments with low return; by taking a little risk (risk here equals short-term fluctuations) we can get higher long-term reward. Common sense says this risk-reward trade-off spectrum continues forever. But in fact it doesn't. As a math fact, you can't get a higher long-term growth rate than you get from the "100% Kelly strategy". You've free to take more risk if you like excitement but you don't benefit from it. There's a rather nice book on this topic -- Fortune's Formula by William Poundstone -- and this is my review on my web page. He uses the slogan I've borrowed -- 100% Kelly strategy marks the boundary between aggressive and insane investing -- and it's a pretty accurate slogan. In everyday life actions under uncertainty, people are predictably irrational. There's a lot of psychology research (Amos Tversky et al) giving experiments on "decisions under uncertainty". A good reference is R.S. Nickerson Cognition and Chance: the psychology of probabilistic reasoning. Here's the most famous example: decisions can be strongly affected by how information is presented. Imagine a rare disease is breaking out in some community. if nothing is done, 600 people will die. There are two possible programs. For half our subjects, describe the alternatives as (A) will save 200 people. (B) will save everyone with chance 1/3 and save no-one with chance 2/3 For the other half of our subjects, describe the alternatives as (C) 400 people will die (D) no-one will die with chance 1/3; 600 people will die with chance 2/3. Here's what happens. Given the "A or B" choice, most people choose A. Given the "C or D" choice, most people choose D. Of course these are logically the same: A = C and B = D but because they're presented differently, people react differently. If I say "your action will for sure save 200 people", you want to do that. If I say "400 people will die for sure because of your action", then you don't want to be responsible for that. In my undergraduate course, students do course projects, and one option is to repeat some classic experiment. Here's a fun example. • Subjects: college educated, non-quantitative majors. • Equipment: bingo balls (1 -- 75) and 10 Monopoly$500 bills.
• Draw balls one at a time; subject has to bet \$500 on whether next ball will be higher or lower than last ball; prompt subject to talk (recorded) about thought process. Repeat for 5 bets.
• Say: we're doing this one last time; this time you have option to bet all your money. Prompt talk.
It's not clear to the subjects -- or even to you or me when we read this description -- what is the point of this experiment. The point is that we're interested, not so much in people's actions, as in their reasons for their actions.
In first part, everyone behaves and explains rationally: if this ball is 43 then more likely that next ball is less than 43, so bet that way.
In the last part, what explanations do people give for their choice of whether or not to bet all their money? In our experiments, about 50-50 split between
• risk-aversion; good or poor chances to win
• feeling (or have been) lucky or unlucky.
Conclusion: even when primed to think rationally, people have innate tendency to revert to "luck" explanations.

My (non-expert) bottom line? We have a medium-scale" understanding of how people think about uncertainty -- rational or irrational -- at least in a laboratory setting. That is, in maybe 15 settings like the two mentioned, we can abstract the structure of the situation and predict that in similar situations, people will behave in the similar rational or irrational ways.

But no consistency across all 15 settings. For any setting when we can predict people will be irrational in one direction, there's another setting where we can predict they'll be irrational in the other direction.

Bottom line: humans not basically rational; different parts of our mental structure come into play with these different settings.

In predicting the future, remember inertia, trends, statistical fluctuation, unpredictable unique events

My final topic is more philosophical. Philosophical-minded people have long debated to what extent human history is predictable or unpredictable.
• Had Cleopatra's nose been shorter, the face of the world would have changed. (Pascal)
For quantitative people, arguing about ancient history isn't so appealing; a more precise question is "how well can you predict the future" and a closely related question is "how well did past predictions work out?" Of course it's important to decide on a time scale -- predicting 2 days ahead is very different from prediction 200 years ahead -- so let's take 25 years.

Predict the state of the world in 2033
(or: how good were 1983 predictions for 2008?)

Of course we don't expect to be very accurate ........

I'm not going to reveal any new crystal ball for making predictions, but I am going to share my intellectual tools for thinking about other people's predictions. My point is that people making predictions tend to focus on just some of these, according to their own mind-set. And that 2 of these 4 tools are somewhat related to probability.

Inertia: In much everyday life we just assume aspects of the world will be unchanged in 25 years. Imagine a student deciding to be a doctor or a lawyer, or to learn French; or someone building an office building or planting a tree. In all these matters you're assuming that in 25 years there will still be doctors and lawyers and French-speakers and that people will work in office buildings, etc. Now I'm not disputing these examples. However, to relate a personal example, let me tell you the only bad advice I ever got from my father.

• Son, don't bother to learn typing, soon enough you'll have a secretary to do that!
Ha-Ha.

Point: when you think about how the future might be different, you unconsciously assume that aspects you're not thinking about will stay the same.

Trends. Easy to look back over 25 years and identify trends -- what trends you pick out depend on your own interests.

• Moore's law
• China's economic growth
• continued slow increase in life expectancy
You can speculate on each trend: accelerate or continue or slow or stop or reverse?
You can speculate about new trends. Consider nanotech or virtual worlds. Today the number of people employed in nanotech is negligible compared to the number employed as janitors, and the time spent in Second Life is negligible compared to the time spent watching TV soap operas. This might change in 25 years.

How good were past predictions? Two examples:
1982 best-seller Megatrends (John Naisbitt) does pretty good job
1972 "Limits to Growth" was embarassingly wrong.

It's surprisingly hard to statistically estimate how good past predictions were, because of selection bias and survivorship bias: the predictions that are remembered or are easy to find tend to be those that were spectactularly right or wrong.

I don't have anything to say here other than the obvious: it's silly to ignore trends, and equally silly to blindly extrapolate trends.

Statistical fluctuations. Imagine you wake after 25 years sleep, and decide to look at the 9,000 daily headlines you missed.

I say: about as useful as looking at results of dice throws. Because you'll see

• earthquakes, hurricances, plane crashes
• small wars
• political sex scandals
• partisan politics as a game
• Dow drops 3%
Point: News presents itself as "change" but mostly isn't. These things are interesting to follow in real time, in the same sense that's it's interesting to follow a football game in real time, but common sense says that the statistical distribution of most of these types of headlines over the next 25 years will be similar to those over the last 25 years. In fact it would be significant if any of these types of headlines did disappear.

Impact of unique unpredictable events. My final topic -- back to Cleopatra's nose -- the impact of unique unpredictable events -- is prompted by the recent bestseller The Black Swan: The impact of the highly improbable by Nassim Taleb. He writes that a black swan is an event of

.... rarity, extreme impact, and retrospective (though not prospective) predictability. A small number of Black Swans explain almost everything in our world .....

I've spent a long time thinking of the right phrase to describe this book, and my current humorous phrase is "like the da Vinci Code as written by Humpty Dumpty" That is, the author is widely read, has a fertile imagination and writes in a lively way, but the proposition as formulated above is rather absurd. Like Alice's Humpty Dumpty, the author uses words to mean whatever he wants at the moment, and like the nursery rhyme the book resembles fragments hard to assemble into a coherent whole.

In particular, there is no attempt to make a quantitative assessment of "unique events versus trends" or versus other alternatives. But it would be interesting to do so.

Project for a young person. Write down a long list (5,000?) of possible "Black Swans" for the next 10 years -- events generally reckoned to have chance less than 1%, say. Any science ficton fan like myself can rattle off 100 without pausing for thought! Wait 10 years. Then see: How many happened? how many others happened that you didn't think of? This would provide empirical evidence in place of idle speculation.

Having been critical of Mr Taleb's book, it is only fair to give him the the last word. I show this slide without comment, except to remark it may be the only time you ever see the words "mathematics" and "expensive suits" in such close juxtaposition.


text:
0 like 0 dislike
166 views
Let $T$ be the transition matrix of a Markov process. If $P$ is a probability vector, show that $T P$ is also a probability vector.
| 166 views

0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
1 like 0 dislike


text:
# How to choose at what sample size standard deviation becomes reliable for my purposes?

I'm calculating standard deviation for a normally distributed variable. I'm receiving data samples online, and I've noticed that right after the start (for a small sample size) standard deviation is far too away from a real. I need somehow to select the number of samples I need to wait, until I will be able to use the calculated deviation.

So, I've started my research in Excel.

I am generating normally distributed variable with $$\sigma = 15$$:

=NORM.INV(RAND(),0,15)

Measuring the population standard deviation:

=STDEV.P(A2:A14553)

And for each new sample I'm measuring the sample standard deviation for all previous samples:

=STDEV.S($$A$$2:A3)

And then dividing sample standard deviation by population standard deviation and obtaining this ratio for each sample size:

After refreshing it multiple times I am able to see that I need to wait something like 3000 samples before starting using sample standard deviation. But I don't really want to hardcode it, since I don't fully understand how this number can change for different dataset.

What is the right way to calculate this number?

• – Glen_b Aug 2 '19 at 15:14

There is no “right” standard deviation that comes from the “correct” number of samples. There is only the law of large numbers and the rule of thumb that is 30 samples.

Your experiment is a great way to think through this and shows you what you need to know:

The sample distribution (standard deviation included) approaches the population distribution as it becomes closer in count to the population, and so sample heavily when possible and do not rely too heavily on any sample that is not quite large.

Another way to understand this is to research the closed form calculation of the sample standard deviation. You will see that an argument of this function is the sample size.

• What does the actual rule of thumb you refer to claim to be true, and how does it help decide what the standard error of the standard deviation would be? – Glen_b Aug 2 '19 at 9:54

I've found this paragraph in wiki, which directly answers my question.

For example, for a 95% CI and sample size N=100, sample SD lies from 0.88 × SD to 1.16 × SD

So, to find N all I need is to choose what difference from real SD I can let and how confident I want to be.

Here's a full answer, if the wiki will be updated:

The standard deviation we obtain by sampling a distribution is itself not absolutely accurate, both for mathematical reasons (explained here by the confidence interval) and for practical reasons of measurement (measurement error). The mathematical effect can be described by the confidence interval or CI. To show how a larger sample will make the confidence interval narrower, consider the following examples: A small population of N = 2 has only 1 degree of freedom for estimating the standard deviation. The result is that a 95% CI of the SD runs from 0.45 × SD to 31.9 × SD; the factors here are as follows:

• You need to put the answer in the answer, not just a link to somewhere else. While you can link elsewhere for support or for additional information, answers must be able to stand on their own - external links may move or even disappear altogether; your answer must still be fully understandable if that occurs. – Glen_b Aug 2 '19 at 9:52


text:
1. ## Integration

How do you integrate xdx/sqrt(x-x^2) (exercise 4.3 question 1h) from terry lee)?

Thanks for the help

2. ## Re: Integration

$\int \frac {x}{\sqrt{x-x^2}}dx = \int \frac {(-\frac {1}{2}(1-2x) + \frac {1}{2})}{\sqrt{x-x^2}} dx = -\frac{1}{2}\int \frac {1-2x}{\sqrt {x-x^2}}dx + \frac {1}{2} \int \frac {1}{\sqrt {\frac {1}{4} - (x^2-x+ \frac {1}{4})}} dx\\ \\ = -\frac{1}{2}\int (x-x^2)^{-\frac{1}{2}}d(x-x^2) + \frac{1}{2}\int\frac {1}{\sqrt {(\frac{1}{2})^2 - (x-\frac{1}{2})^2}} dx\\ \\ = -\sqrt{x-x^2} + \frac {1}{2} sin^{-1}\frac {x-\frac{1}{2}}{\frac {1}{2}} + C\\ \\ = -\sqrt{x-x^2} + \frac{1}{2} sin^{-1}(2x-1)+ C$

3. ## Re: Integration

Originally Posted by Drongoski
$\int \frac {x}{\sqrt{x-x^2}}dx = \int \frac {(-\frac {1}{2}(1-2x) + \frac {1}{2})}{\sqrt{x-x^2}} dx = -\frac{1}{2}\int \frac {1-2x}{\sqrt {x-x^2}}dx + \frac {1}{2} \int \frac {1}{\sqrt {\frac {1}{4} - (x^2-x+ \frac {1}{4})}} dx\\ \\ = -\frac{1}{2}\int (x-x^2)^{-\frac{1}{2}}d(x-x^2) + \frac{1}{2}\int\frac {1}{\sqrt {(\frac{1}{2})^2 - (x-\frac{1}{2})^2}} dx\\ \\ = -\sqrt{x-x^2} + \frac {1}{2} sin^{-1}\frac {x-\frac{1}{2}}{\frac {1}{2}} + C\\ \\ = -\sqrt{x-x^2} + \frac{1}{2} sin^{-1}(2x-1)+ C$
Thanks for the help. Do you mind explaining your thought process for getting the first line where you knew to do -0.5 (1-2x) + 0.5? Thanks again

4. ## Re: Integration

Hey I know it's been answered but I still wanna upload it so I can ask a question. pikachu integral image.png. How can I put the latex in the actual post like the others above? I only know how to link as a picture

5. ## Re: Integration

Originally Posted by BenHowe
Hey I know it's been answered but I still wanna upload it so I can ask a question. pikachu integral image.png. How can I put the latex in the actual post like the others above? I only know how to link as a picture
Did you type it as a code? Click reply to Drongoski's post and see the code required for latex

6. ## Re: Integration

Ok lemme try [tex] $\int\frac{x}{\sqrt{x-x^{2}}}dx$

$=-\frac{1}{2}\int\frac{-2x}{\sqrt{-x^{2}+x}}dx$

$=-\frac{1}{2}\int\frac{-2x+1}{\sqrt{-x^{2}+x}}-\frac{1}{\sqrt{-x^{2}+x}}dx$

$now -x^{2}+x=-(x^{2}-x)$

$=-((x-\frac{1}{2})^{2}-\frac{1}{4})$

$=(\frac{1}{2})^{2}-(x-\frac{1}{2})^{2}$

$=-\frac{1}{2}\int\frac{-2x+1}{\sqrt{-x^{2}+x}}-\frac{1}{\sqrt{(\frac{1}{2})^{2}-(x-\frac{1}{2})^{2}}}dx$

$=-\sqrt{-x^{2}+x}+\frac{1}{2}sin^{-1}(2x-1)+c\hspace{0.1cm}$ [\tex]

7. ## Re: Integration

Originally Posted by BenHowe
Ok lemme try [tex] $\int\frac{x}{\sqrt{x-x^{2}}}dx$

$=-\frac{1}{2}\int\frac{-2x}{\sqrt{-x^{2}+x}}dx$

$=-\frac{1}{2}\int\frac{-2x+1}{\sqrt{-x^{2}+x}}-\frac{1}{\sqrt{-x^{2}+x}}dx$

$now -x^{2}+x=-(x^{2}-x)$

$=-((x-\frac{1}{2})^{2}-\frac{1}{4})$

$=(\frac{1}{2})^{2}-(x-\frac{1}{2})^{2}$

$=-\frac{1}{2}\int\frac{-2x+1}{\sqrt{-x^{2}+x}}-\frac{1}{\sqrt{(\frac{1}{2})^{2}-(x-\frac{1}{2})^{2}}}dx$

$=-\sqrt{-x^{2}+x}+\frac{1}{2}sin^{-1}(2x-1)+c\hspace{0.1cm}$ [\tex]
You don't press enter for a new line maybe it is \\

8. ## Re: Integration

$\int\frac{x}{\sqrt{x-x^{2}}}dx\\=-\frac{1}{2}\int\frac{-2x}{\sqrt{-x^{2}+x}}dx\\=-\frac{1}{2}\int\frac{-2x+1}{\sqrt{-x^{2}+x}}-\frac{1}{\sqrt{-x^{2}+x}}dx\\ now -x^{2}+x=-(x^{2}-x)\\=-((x-\frac{1}{2})^{2}-\frac{1}{4})\\=(\frac{1}{2})^{2}-(x-\frac{1}{2})^{2}\\=-\frac{1}{2}\int\frac{-2x+1}{\sqrt{-x^{2}+x}}-\frac{1}{\sqrt{(\frac{1}{2})^{2}-(x-\frac{1}{2})^{2}}}dx\\=-\sqrt{-x^{2}+x}+\frac{1}{2}sin^{-1}(2x-1)+c\hspace{0.1cm}$

9. ## Re: Integration

Originally Posted by pikachu975
Thanks for the help. Do you mind explaining your thought process for getting the first line where you knew to do -0.5 (1-2x) + 0.5? Thanks again
Using my personal way of integrating, I note that the derivative of x-x2 is 1-2x. so I prepare the denominator of the integrand to have a multiple of 1-2x with some remainder. What I have done is to fiddle the integrand into 2 parts that are easily integrable. Because I have been doing this for many many many years, I can see what I need to do.

10. ## Re: Integration

Originally Posted by Drongoski
Using my personal way of integrating, I note that the derivative of x-x2 is 1-2x. so I prepare the denominator of the integrand to have a multiple of 1-2x with some remainder. What I have done is to fiddle the integrand into 2 parts that are easily integrable. Because I have been doing this for many many many years, I can see what I need to do.
How would you integrate x^2 dx / (x^2 - 2x + 3) lol sorry integration is so hard....

I got x + ln|x^2 - 2x+3| - (tan^-1 (x-1 / root2))/root 2 but it looks weird

11. ## Re: Integration

Originally Posted by pikachu975
Thanks for the help. Do you mind explaining your thought process for getting the first line where you knew to do -0.5 (1-2x) + 0.5? Thanks again
$\noindent Steps to evaluating any integral like this (linear function on numerator and degree two polynomial (quadratic) in denominator or in a square root in denominator) is as follows. Let q(x) be the quadratic present (it was x -x^{2} in your case).$

$\noindent 1. Write the linear function in the numerator as aq'(x) + b for some suitable constants a and b. (You can show as an exercise that there'll always exist a unique pair of such constants a and b.)$

$\noindent 2. Observe the integral becomes a \int\frac{q'(x)}{\sqrt{q(x)}}\,\mathrm{d}x + b\int\frac{1}{\sqrt{q(x)}}\,\mathrm{d}x. (Or leave out the square roots obviously if the original integral had no square roots.)$

$\noindent 3. Evaluate these two integrals. The first can be done by inspection or substituting u = q(x), \mathrm{d}u = q'(x)\,\mathrm{d}x. The second can be done e.g. by completing the square to make it of the form of a standard integral (though it may not be on the Standard Integrals sheet anymore).$

12. ## Re: Integration

Originally Posted by pikachu975
How would you integrate x^2 dx / (x^2 - 2x + 3) lol sorry integration is so hard....

I got x + ln|x^2 - 2x+3| - (tan^-1 (x-1 / root2))/root 2 but it looks weird
$\noindent Add and subtract -2x +3 to the numerator of the integrand, so the integral becomes \int \left(1 + \frac{2x-3}{x^{2} -2x +3}\right)\,\mathrm{d}x = x + \int \frac{2x-3}{x^2 -2x +3}\,\mathrm{d}x. This latter integral can be tackled using the procedure outlined above.$

13. ## Re: Integration

Originally Posted by InteGrand
$\noindent Steps to evaluating any integral like this (linear function on numerator and degree two polynomial (quadratic) in denominator or in a square root in denominator) is as follows. Let q(x) be the quadratic present (it was x -x^{2} in your case).$

$\noindent 1. Write the linear function in the numerator as aq'(x) + b for some suitable constants a and b. (You can show as an exercise that there'll always exist a unique pair of such constants a and b.)$

$\noindent 2. Observe the integral becomes a \int\frac{q'(x)}{\sqrt{q(x)}}\,\mathrm{d}x + b\int\frac{1}{\sqrt{q(x)}}\,\mathrm{d}x. (Or leave out the square roots obviously if the original integral had no square roots.)$

$\noindent 3. Evaluate these two integrals. The first can be done by inspection or substituting u = q(x), \mathrm{d}u = q'(x)\,\mathrm{d}x. The second can be done e.g. by completing the square to make it of the form of a standard integral (though it may not be on the Standard Integrals sheet anymore).$
Thanks a lot for this. How about with a higher degree on the numerator - e.g. x^3 dx / (x^2 + x + 1)

14. ## Re: Integration

Originally Posted by pikachu975
Thanks a lot for this. How about with a higher degree on the numerator - e.g. x^3 dx / (x^2 + x + 1)
$\noindent Use polynomial division first and the remainder term'' (remainder you get from doing the polynomial long division divided by the divisor, x^2 + x +1 here) will be amenable to the procedure outlined above. This is because the remainder has lower degree than the divisor. (The quotient term will just be a polynomial, which is easy to integrate.)$

Note that in your previous one where I added and subtracted something to get the numerator of lower degree than the denominator was actually just a shortcut method of polynomial division. (So even if the numerator has equal degree to the denominator, we need to divide first so that the numerator degree becomes strictly less than the denominator degree, after which we can use the earlier outlined method.)

Also note that if the denominator is a quadratic (without square root) with two easy roots and the numerator is a linear function (including constant function), we can also use the method of partial fractions relatively easily.

15. ## Re: Integration

Originally Posted by pikachu975
How would you integrate x^2 dx / (x^2 - 2x + 3) lol sorry integration is so hard....

I got x + ln|x^2 - 2x+3| - (tan^-1 (x-1 / root2))/root 2 but it looks weird
I think you thought your question was $\int\frac{x^{2}}{\sqrt{x^2-2x+3}}dx$ not $\int\frac{x^{2}}{x^{2}-2x+3}dx$ cause of the sqrt on the denominator in the 1st q

Makes a substantial difference

16. ## Re: Integration

Originally Posted by BenHowe
I think you thought your question was $\int\frac{x^{2}}{\sqrt{x^2-2x+3}}dx$ not $\int\frac{x^{2}}{x^{2}-2x+3}dx$ cause of the sqrt on the denominator in the 1st q

Makes a substantial difference
I did what integrand said and added and subtracted something from the numerator

Originally Posted by InteGrand
$\noindent Use polynomial division first and the remainder term'' (remainder you get from doing the polynomial long division divided by the divisor, x^2 + x +1 here) will be amenable to the procedure outlined above. This is because the remainder has lower degree than the divisor. (The quotient term will just be a polynomial, which is easy to integrate.)$

Note than in your previous one where I added and subtracted something to get the numerator of lower degree than the denominator was actually just a shortcut method of polynomial division. (So even if the numerator has equal degree to the denominator, we need to divide first so that the numerator degree becomes strictly less than the denominator degree, after which we can use the earlier outlined method.)

Also note that if the denominator is a quadratic (without square root) with two easy roots and the numerator is a linear function (including constant function), we can also use the method of partial fractions relatively easily.
Thanks for the response but why do we use the remainder?

17. ## Re: Integration

Originally Posted by pikachu975
I did what integrand said and added and subtracted something from the numerator

Thanks for the response but why do we use the remainder?
Its degree is less than the denominator's so we can use the method outlined earlier for that part.

18. ## Re: Integration

Originally Posted by InteGrand
Its degree is less than the denominator's so we can use the method outlined earlier for that part.
So for example the remainder is x, then you use x/(x^2+x+1) ? Why does it still give the same answer?

19. ## Re: Integration

Originally Posted by pikachu975
So for example the remainder is x, then you use x/(x^2+x+1) ? Why does it still give the same answer?
$\noindent You also have to include the quotient part (this part is easy to integrate as it is just a polynomial). So rewrite the fraction as a polynomial (quotient) plus the remainder divided by the dividend and go from there.$

20. ## Re: Integration

$\noindent E.g. By polynomial division, \frac{x^{3}}{x^{2} + 1} = \underbrace{x}_{\text{quotient}} - \underbrace{\frac{x}{x^{2}+1}}_{\text{remainder part''}}, so$

\begin{align*}\int \frac{x^{3}}{x^{2} +1}\,\mathrm{d}x &= \int \left( x -\frac{x}{x^{2}+1}\right)\,\mathrm{d}x \\ &= \cdots .\end{align*}

21. ## Re: Integration

Originally Posted by InteGrand
$\noindent E.g. By polynomial division, \frac{x^{3}}{x^{2} + 1} = \underbrace{x}_{\text{quotient}} - \underbrace{\frac{x}{x^{2}+1}}_{\text{remainder part''}}, so$

\begin{align*}\int \frac{x^{3}}{x^{2} +1}\,\mathrm{d}x &= \int \left( x -\frac{x}{x^{2}+1}\right)\,\mathrm{d}x \\ &= \cdots .\end{align*}
Thank you for the help as well as Drongoski and BenHowe

22. ## Re: Integration

Originally Posted by InteGrand
$\noindent E.g. By polynomial division, \frac{x^{3}}{x^{2} + 1} = \underbrace{x}_{\text{quotient}} - \underbrace{\frac{x}{x^{2}+1}}_{\text{remainder part''}}, so$

\begin{align*}\int \frac{x^{3}}{x^{2} +1}\,\mathrm{d}x &= \int \left( x -\frac{x}{x^{2}+1}\right)\,\mathrm{d}x \\ &= \cdots .\end{align*}
How did you write the quotient and remainder part underneath the terms, it looks so epic

23. ## Re: Integration

Pikachu the only reason I said that you mighta thought it had the square root in the denominator because originally I thought it did as well and got the same answer as you

24. ## Re: Integration

Originally Posted by BenHowe
How did you write the quotient and remainder part underneath the terms, it looks so epic
I used

Code:
\underbrace{...}_{\text{...}}
.

(Replace the first "..." with the thing you want the brace to go under and the second "..." with what text you want to write under the brace.)

25. ## Re: Integration

Originally Posted by BenHowe
Pikachu the only reason I said that you mighta thought it had the square root in the denominator because originally I thought it did as well and got the same answer as you
I checked I didn't have it, I used integrand's method stated somewhere above

Page 1 of 2 12 Last

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•


text:
# Linear Algebra - Linear Constant Coefficient Difference Equations

1. Dec 6, 2008

### symsane

1. The problem statement, all variables and given/known data

x[n] = -x[n-1] + x[n-2] + x[n-3] and x[0]= 0, x[-1]= 0, x[-2]= -1

We want to find "x[n]". When I started to solve this problem I acquired that lambda1= 1 and lambda2,3= -1. I couldn't do anything after lambda's are found. So, can anyone solve the remaining part?

2. Dec 6, 2008

### Pere Callahan

So I assume you used the ansatz
$$x[n]=\lambda^n$$
?

well, just build up a linear combination from your three lambdas
$$x[n]=A+B(-1)^n+C n (-1)^n$$
Because there is this double root at -1 you need to multiply one of the terms by n. Do you know this type of thing from ODE's?

Then plug in your initial values and solve for A,B,C.

This is a linear system of equations with three unknowns and solution A=-1/4, B=1/4, C=-1/2.

3. Dec 6, 2008

### HallsofIvy

Staff Emeritus
But it is 0 that is a double root so it is not (-1)n that you need to multiply by n! You should have $x_n= A+ Bn+ C (-1)^n$.

4. Dec 6, 2008

### Pere Callahan

I think 0 is not even a single root. Plugging in x[n]=lambdan gives
$$\lambda^{n}=-\lambda^{n-1}+\lambda^{n-2}+\lambda^{n-3}$$
or
$$\lambda^{3}=-\lambda^{2}+\lambda^{1}+1$$
I think the OP's calculation of the roots was correct.


text:
Featured resource

Practising Mathematics: Developing the mathematician as well as the mathematics

How can your students work like mathematicians?

An engaging selection of tasks contain activities from many areas of mathematics including: Number work, Ratio and Proportion, Algebra, Geometry, Probably and Statistics.

Members: $38.00 inc.GST Others:$ 47.50 inc.GST

Home > Early Years > Starting Points > Informal Measurement

Informal Measurement

This child is exploring measurement of mass through balancing the scale.

• How will you know when the scale is balanced?
• How many weights do you have on each side?
• Is that an odd or even number?
• Which end of the scale is heavier/lighter?
• How many more weights will you need to add to the left/right side of the scale to make it balance?

[Contributed by Megan Gibbs and Sandy Treloar]

Join the discussion in the Starting Points forum.


text:
# Arrange the following electromagnetic radiations per quantum in

Question:

Arrange the following electromagnetic radiations per quantum in the order of increasing energy :-

A : Blue light
B : Yellow light
C : X–ray

1. B, A, D, C

2. D, B, A, C

3. A, B, D, C

4. C, A, B, D

Correct Option: , 2

Solution:


text:
# Material selection of heating element

I am interested in heating coils which are heated using Ohmic/Joule/resistive heating - specifically, how the material for the heating coil is selected.

When I read about heating coil materials - nichrome, carbon fibre etc, the material quality that is mentioned most is electrical resistance (along with a high melting point and stability with changes in temperature). It is my understanding that a high resistance material is typically selected to make heating coils, but how does the thermal conductivity of a material impact the suitability of a material for use as a heating coil?

If two materials had comparable resistance but very different values for thermal conductivity - which material would be the better choice, assuming the goal was a heating coil that heated up quickly using the least amount of electrical power?

## 3 Answers

Consider that ohmic heaters are usually made of thin wire, and that the majority of the current flow going through any wire is close to the surface of the wire. Both these things mean that even if the wire itself might be a poor conductor of heat, that heat has only a very short distance to travel before it reaches the wire surface and gets carried away by conduction, convection and radiation. Because of this we wouldn't expect the wire's thermal conductivity to make much difference.

Even if it did, consider the following case where we assume the hot wire is quite nonconductive thermally. This means that the heat generated in the wire can't get out easily. This means the wire gets hotter and hotter with time, until it begins to glow with heat. At that point, the primary heat transfer mode becomes radiative and the heat escapes anyway.

1. For maximum power efficiency, you want to match the load impedance (i.e., the heating element resistance) to the source impedance (i.e., the resistance of everything else in the circuit, including the power supply). This is the maximum power transfer theorem. (Volumetric heat generation is $$J^2\rho$$, where $$J$$ is the current density and $$\rho$$ is the resistivity. With a lower load resistance, you're not taking advantage of the circuit current. With a higher load resistance you're dragging down the circuit current.) Choose your material (and its electrical resistivity) and its geometry (cross-sectional area $$A$$ and length $$L$$) accordingly, considering that the linear resistance is $$R=\rho L/A$$.

2. The presence of thermal conduction means that the temperature profile of the heating element will be parabola- or catenary-shaped to some extent. To suppress this profile and obtain a fairly uniform temperature, choose a material with a high thermal conductivity, maximize the cross-sectional area, and/or minimize the heating element length. In addition, choose connectors with poor thermal conductivity to avoid bleeding away heat.

• The maximum power transfer theorem is often irrelevant here. For example, the impedance of a house 240V mains supply is probably of the order of 0.1 ohms, and the max power theorem would only be relevant if the output current from the supply was thousands of amps - but that the breakers would trip long before the current reached that value.. – alephzero Aug 14 '20 at 2:44
• What is "here"? The question asks specifically about power transfer maximization, so my answer is a general one. I don't disagree with you if one is designing a household toaster, but the context might be a microfabricated element, a spacecraft, military gear, a drone, a deep-ocean submersible, etc. – Chemomechanics Aug 14 '20 at 6:18

Not really much to choose from : platinum , nichrome ( with modest variations like 0.5 % Al) and for some high temperatures ,silicon carbide . Platinum tends to disappear on weekends when a facility is shut down . So the practical choice is nichrome whatever the conductivity. The decision is wire diameter and coil configuration.