Why are electric bikes so expensive?

Question: The limited selection of electric bikes available at Halfords ranges from £699.99-£1,199.99. What makes them so expensive — the dynamo, battery, or something else?
Comment: If you think that is bad, look at how much electric wheelchairs cost!
Comment: I wish my road bike was so cheap!
Answer: I have sold a small quantity of electric bicycles over the years (including one to a 83 year old woman). Were these profitable sales, from the bike-shop's point of view? Not really...
Frame + Extras
Cost is different to price, clearly the bicycle costs more to build, e.g. in Giant's top-class Taiwan factory on a relatively limited production run. As mentioned in other answers, there is the motor, the batteries and control gear. On top of that there is also a more expensive frame. The frame has more 'braze-ons' to mount the electric running gear. It is also extra tough so that the frame and fork can survive (force = mass x acceleration and an electric bike goes quicker with extra mass). This frame/fork combination is also unique to the electric models whereas, on a normal bike, the frame may be shared across a model range.
As well as the frame/fork being different, the wheels and tyres are up-rated, this may not actually cost that much more rubber and aluminium, however, these parts are model specific, limited run for the manufacturer, possibly specially made by the suppliers.
As of yet there are no electric bikes that make use of the frame to carry the battery, typically this has to have a rack and extra packaging to attach it to the bicycle. These parts cost money, again they are also bespoke.
The batteries can use Lithium, NiMh or even lead-acid, clearly with cost differentiation, the Lithium cells costing more.
As of yet we have not left the factory with our electric bicycle, the extra parts and Far Eastern labour may not actually amount to a lot in absolute terms, however the factory-cost will be a significant multiple of the regular mass-market mountain/hybrid bicycle cost. The parts cost more as does the assembly line.
Shipping: Weight and size
When we come to ship the electric bicycle half-way around the world, there is approximately twice the cost, whether the shipping is priced by weight or volume. This is because the electric bicycle weighs more and needs a much bigger box (compared to a typical MTB that ships with the bars/front-wheel/seat/pedals removed and no mudguards). Interestingly there is less EU 'anti-dumping' duty on electric bikes than normal ones, so no added cost there (and if you wondered why some bikes come from Macau you now know...). Some money does have to be paid to get the boxes out of Felixstowe, on the back of the lorry and up to the warehouse, again this is slightly more than the regular MTB or hybrid, but not massively so.
Warehousing margins
Now, this is where the costs get interesting. The bike arrives at the wholesaler or distributor and gets put into a warehouse until a retailer orders it. The wholesaler has price tiers for their 'B2B' customers (the shops) and these will be different depending on sales volumes, e.g. the big chain will get an extra 10-20% off the 'trade price' compared to the family-run lower volume shop. Because the product has a list price then this discount is unlikely to be passed on to the end customer, however, it does give the volume retailer that bit more room come end-of-season sales.
Notionally the wholesaler/importer/distributor is just importing boxes, putting them in a warehouse and sending them out again. In an ideal world they would charge just a flat fee for this, however, the more expensive boxes tie up more capital, they also tend to linger in the warehouse longer. This means they cannot be marked up by the wholesaler with a 'per box' price. Typically a standard margin is applied to the products, exactly what this margin is may seem high to someone outside of the trade, however, the tax man has a slice of that and some of that margin may be swallowed up by currency fluctuations.
Expensive, Niche Product
When the retailer buys the electric from the company owning the big warehouse they may be buying just the one - most bicycle shops cannot afford the showroom space or the capital cost to have a range of electric bicycles. For this reason it is unlikely that a good deal is done due to bulk purchasing. The delivery to the bike shop may be relatively expensive too - delivery with all couriers in the UK is by weight. So we have double the cost on this leg of the journey when compared to the regular bike.
The retailer has what seems a good bit of money to make on the electric bicycle. However, walk-in customers have not arrived for an electric bike, they are there for normal bikes. They may not even be aware that electric bikes are on offer too. Walk-ins just don't ask for an electric bike - customers wanting touring bikes or tandems are rare, customers wanting electric bikes are rarer too for the regular bicycle shop. To change this situation requires promotion, i.e. advertising, a window display and sales staff training. With the exception of retailers that have gone out of their way to push electric bike sales, this does not happen.
Training / Support
As well as the sales staff having to be able to know how to sell an electric bike the mechanics in the back room have to know how to make them showroom ready. Then, should a sale come along, the bike has to be checked to make it safe. Additionally, the bike will collect quite a bit of dust waiting for a customer and be subjected to test rides by potential customers. This total time will be a lot more than with the regular bike because the electric bike is not so familiar to the workshop team. It is unlikely that this time is costed, however, it all adds up. Hence the eventual sale is unlikely to be discounted (unless the shop is small and desperate for some extra cashflow that week or the model is end of season and needs to be shifted). The taxman also takes his cut, 20% VAT is not a lot of money if buying a 'Bicycle Shaped Object' (cheap bike), but is a lot of money if buying an electric bicycle.
Margin Pricing
If we work through the above steps starting with one small component, e.g. a washer that costs a penny. Its cost could be ten pence by the time it has been fitted onto the bike, maybe up to twenty pence to get to the warehouse in Milton Keynes. Because of how margin costing works, the washer could then cost forty pence by the time it gets to the showroom. On the face of it, it seems ludicrous that a penny washer now costs forty times as much, however, along the way nobody has been greedy (maybe with the exception of the taxman, but that is government protection rackets for you - lots of wars to pay for).
Although the maths has been simplified with the 'washer' example, costs go up from component supplier to the cycle manufacturer to the distributor and to the dealer with the maths being multiplication (by a margin) rather than addition (of a handling fee) at most steps. That is how it works.
Clearly, to save costs a cheaper washer could be used - one that costs the factory 0.5 pence - and it could be fitted to the bike by someone in mainland China costing less than the Taiwanese worker. The factory too could be cheaper - with less capital tied up in the building/land. This 'cheaper and nastier' product could then enter the supply chain to be marked up with margins at the importer-distributor-wholesaler-retailer steps. Given that the product is not really one that anyone really wants, some incentives exist in the supply chain, e.g. higher margin for the retailer. Hence the 'cheap' electric bike - as sold by certain High Street chains - might be a complete rip-off with the worst components and the fattest of profits for someone in the chain.
You might suspect that parts and training would factor into the costs, but it does not do so directly. Sales and workshop staff in the bike shop are unlikely to have had any training on how to look after customers for electric bikes. The spare parts are not likely to be kept in the cycle shop - these will be special order from the wholesaler. The wholesaler will be able to sell these spares profitably and - if they know what they are doing - keep sufficient spare parts stocked appropriate for demand.
The price is Actually Reasonable
We are a long way off monopoly pricing with electric (and normal) bicycles, due to competition in the marketplace the pricing is nearer 'cost + acceptable profit' rather than 'what the market will tolerate'. Electric bikes are not expensive per se. With the exception of walking (and maybe container freight) there is no cheaper transportation going. Arguably normal pedal cycling is more expensive than electric bike cycling, however, this depends on how you value your time. Electricity to charge and electric bike costs less than a Mars Bar (or other calorific food equivalent).
In the showroom electric bikes are somewhat clunky feeling, but once you go on the road with them and put the motor on the bike feels as light as a feather, particularly up hills.
My advice for getting an electric bike cheaply is to do so through government 'bike to work' scheme. This is where your employer buys the bike and gets the tax back. Effectively you get the bike at 50% retail price, with actual ownership of the bike being between you and your employer. Typically they let you have it.
Comment: Thankyou. That has to be the most comprehensive answer I've seen on SE.
Comment: "As of yet there are no electric bikes that make use of the frame to carry the battery" isn't actually strictly true, but of course a non-standard frame raises the cost even more than a rack. A couple of examples: http://www.pedelecs.co.uk/forum/electric-bicycles/5130-stromer-e-bike-frame-integrated-battery.html http://turbo.specialized.com/
(The Specialized is newer than your answer, but I've seen others that were older (but not from such a well known manufacturer).)
Answer: It's only because the market is small. In Japan, the average price range of e-bike is 80,000 - 120,000 yen (about $725USD - $1100USD), which is less than half of US e-bike prices. The e-bike sales of Japan in 2014 is 480,000. That's half a billion dollar market, and growing.
If Japanese makers like Panasonic, Bridgestone or Yamaha decides to come into US market, the price will fall. It's not happening just because there is no demand, and people are paying premium.
My sister in Japan has one. I'm seriously thinking about privately import one for me.
Comment: I would also feel safer having an electric bike in Japan because I imagine it would be less likely to be stolen than in the UK.
Comment: These makers pulled out of the US (regular) bicycle market close to 30 years ago, likely due to cost reasons. I don't think the demand would come up enough to make them drop the prices.
Comment: Also Japan has a car culture, but its nothing like the car addiction in the US.  I'd expect to feel safer on a bike on Japanese roads than US roads.
Comment: Importing is worth investigating, but allow for tax and import duties.  Also consider voltage issues with chargers, plug compatibility, and even something simple like warranty services.   Finally remember to check all local rules and laws for maximum permitted wattages, and lighting requirements etc.   Often, electric bikes have to have functional working pedal systems, else they are electric motorbikes.
Comment: I've been thinking of doing a private import myself too. The biggest hurdle is the battery since airplanes have restrictions on maximum size Lithium-Ion that you can bring on board.  p.s. All legal Japanese e-bikes are pedelec (pedal activated).
Comment: I don't know about electric bikes, but the vast majority of ordinary bikes people ride in Japan are "bicycle-shaped objects", which are priced about on-par with the similar quality stuff in the U.S.
Answer: To expand on the answer given by user crasic.
First, the battery. The battery used by an electric bike has to be lightweight, compact, durable and be able to provide high power output - exactly the same as with power tools batteries. Please resist temptation to compare it with cheaper DIY tools - the latter are nowhere near the reliability requirements you would naturally put on an electric bike and such comparison would be meaningless. If you visit just about any professional power tools outlet you'll see that battery powered power tools are relatively very expensive.
Then goes the motor. It must be compact, lightweight, durable and provide high torque for long periods. Again, the same as for many professional power tools. Guess how this affects the price.
Then comes the stuff needed to control the motor - controller, switches, etc. It must be very reliable - the same as with primitive (compared to a laptop) yet powerful electronics used to control a power tool with the same influence on price.
And of course, they are not yet very popular, so the price is rather high because of small production volumes.
That said, you shouldn't expect cheap high quality electric bikes any sooner than cheap high quality professional power tools.
Answer: I would say all three, combined with the fact that electric bikes are still somewhat of a niche market with few lowcost players.
Consider that a cruiser/comfort frame standard bike like the ones for sale on the website would cost at £400-500 on their own. The battery (which is expensive for the capacity required to give a decent ride time), the mechanics especially (the clutch system is complicated and must be robust) all contribute to the production cost.
Given enough demand I could see cheap knockoffs being available for half that price, but unfortunately that isn't the case.
Comment: Cheap know-offs are made, and I fear that at £699.99 that's what you're looking at (but I don't know, I don't follow the electric bike market even where I live, let alone in the UK). I suggest looking at AtoB magazine (http://www.atob.org.uk/) or Electric Bike Magazine http://www.electricbikemag.co.uk/ for reviews.
Comment: @moz at £700 we are talking about $1200, thats not really cheap in my book
Comment: down here $1200 is the cheap end of the market. Well, except the really rubbish Chinese things with lead-acid batteries and a warrenty voided by use of the bike. Reasonable quality starts about $1800: http://glowwormbicycles.com.au/store/wisper-bikes (friend of mine's shop).
Comment: ... and five years later, anything under $AUS2000 is still cheap, and half that is available but they're BSOs with dodgy, dodgy electrics.
Answer: An electric bike doesn't require a special frame.  The motor can be placed in the front hub, the batteries can be stowed in a more or less conventional rear rack, only "double decker" to make a slot for the battery, and controls can all mount on the handlebar.  A perfectly conventional "mountain" bike frame can hold all this, without any modifications.
Schwinn sells such bike.
The cost ($2679 for a bike that otherwise would sell for maybe $650) is due to the inherent cost of the components, the fact that the components and bikes aren't mass-produced, and the ability of the company to simply charge more for a product that is "green" and "disabled-friendly".
Of the components, the battery is probably the most inherently expensive part, with the motor only being expensive to the extent that it isn't mass-produced.  I would guess that the hub/motor could be mass-produced for under 50 USD, if in sufficient quantity.  The battery, OTOH, is likely Li-Ion and can't be made cheaper than maybe 500 USD using current technology.  (But adding to the price of that particular Schwinn model is the fact that the derailer system on the non-battery model is replaced by a multi-speed rear hub, adding another 250 USD or so.)
(BTW, one of these bikes made the week-long 372-mile bike trip I was recently on.  The lady riding it reported that it performed very well -- I didn't witness it first-hand because she was ahead of me most of the time.)
Answer: Some e-bikes are also built using higher standards than regular bikes, which has an impact on their price. The two categories are in 2023 commonly over €3k and can go up to €10k for the highest specs.

Cargo e-bikes have higher permissible weights than regular bikes: a typical sport bike is rated for a total mass of 110-120kg, compact longtails are rated for a total mass between 150kg and 200kg, and front loading cargo e-bikes between 200 and 250kg. This has an impact on the choice of components (cargo grade motors, larger batteries (sometimes doubled), powerful hydraulic brakes,...) and the manufacturing of the frame.
Spedelecs (e-bikes with assisted pedaling up to 45kph) are by law considered as moppeds and must use homologated components, that are more expensive (I'm less familiar with the requirements of Class 3 e-bikes in US).
Given they are also used as commuter/utility vehicle (sometimes as replacement for a second car), they can be spec'd components that are suited for this use (for example an IGH with belt instead of a derailleur), but more expensive. In this context, I would not be surprise that manufacturers can afford higher margins for commercial reasons, as these bikes are rather competing with "second cars" and are not substituting sport bikes.

EDIT: the situation is a bit different in Europe and in US because of regulatory constraints. In Europe, non-spedelec e-bikes are limited to 250W (higher for cargo bikes), which basically requires a mid-drive for applications that require power. In the US, class 2 e-bikes are limited to 750W, which permits the use of cheap hub motors even for cargo bikes.
Answer: Because the battery costs a lot. It is a new technology that made E bikes usable, it was not possible before. A battery is about the third of the price or about. Some price is also for stronger frame than otherwise would be needed and the rest is just marketing decisions.
Comment: I read your point as that the battery and components cost a lot, *on top of what the underlying bike itself costs*.   Does that match your intent?
Comment: Modern batteries are recent invention. Also other technologies like electric cars and even aircraft are not viable without them. But these new batteries are expensive. My Diavelo battery costs $600 but has only half of the capacity in comparison to recent E-bikes, so $1200 may be a reasonable cost for a battery.
Comment: With the reports of cheaper batteries catching fire, it may be worth expanding the answer: the batteries could be made cheaper, but a *high-quality* battery costs a lot. I don't know how much the battery's and the bike's on-board electronics add, but I wonder if that's a consideration also.

Why are electric bikes so expensive?


Binary representation of 129 when using 8bits for two's complement?

Question: I have this confusion regarding binary representation of decimal value 129 (or even 128). If 8 bits are used to represent numbers when doing the two's complement, then we know that '00000000' to '01111111' are used for 0 to 127 and leading 1 is used for negative numbers i.e. 1xxxxxxx where x is any combination of 0's and 1's to represent the value of that negative number.
But then how is 128 represented in 8 bits because the first bit is reserved for telling the number is negative (basically a signed number)?
Answer: The range of integers representable in 8 bits using two's complement is –128 to +127.
If instead the numbers are unsigned, then the range becomes 0 to 255.
Comment: So does this mean that 128 is 10000000 when we are using 8 bits and it will not be confused for a negative number?
Then how can we tell if we are looking at a negative 8-bit number or an unsigned 8-bit number (in cases where the first bit is 1)?
Comment: 128 is not between -128 and +127. As for how to tell whether a number is signed or unsigned, it's impossible. It's up to the programmer to decide whether she interprets a byte as a signed 8-bit integer, an unsigned 8-bit integer, or anything else.


Do Saga and Martin speak Danish, Swedish or both?

Question: In the Swedish/Danish TV series Bron/Broen (aka "The Bridge"), when Saga (from Sweden) and Martin (from Denmark) are together, what language do they speak? How about other characters? We don't speak either language and watch with English subtitles so we have no way of telling for sure.
Comment: This is intriguing! I'm an avid watcher of "The Bridge"....simply marvellous! A Swedish colleague at Opera North told me Danes & Swedes can understand one another; rather, she said, as Spaniards & Italians can, when speaking their own languages. That's something I can relate to, being fluent in both those languages! In fact, I often come out with Spanish when talking Italian & vice versa. Edward Thornton.
Comment: I was hoping for a comment from someone who has actually watched the show, just to be certain. The existing answer says, "I have no idea about the other characters as I haven't seen anything of the show myself."
Comment: Swedes and Danes think we can understand each other, but there are a lot of misunderstandings and 'false friends' in the languages. Some words have the same roots but completely different meanings. However, most Scandinavians can at least  read the other two languages. People in Copenhagen is usually rather good at understand Swedish and tries to speak in a way that Swedes would understand. Counting words are the biggest challenge.
Answer: They both speak their native language. Saga speaks Swedish and Martin Danish.
I have no idea about the other characters as I haven't seen anything of the show myself, except for trailers, but they are most likely speaking their native language. So, whoever you can identify as a Swede would most certainly be speaking Swedish, and all the Danes would most likely be speaking Danish. Most Swedes have a bit of a hard time understanding Danish, though, so don't be surprised if they start speaking English all of a sudden.
Answer: When Martin speaks to a Swede, he articulates every syllable and softens the glottal stop characteristic of Danish (stød), moving his speech toward something you could call a toneless Norwegian, thus much easier for a Swede or Norwegian to understand. When he speaks to another Dane, it's regular conversational Danish. The Swedes simply speak Swedish.
Answer: Swedish and Danish (and Norwegian) are mutually intelligible. You can compare them to Serbian and Croatian. The danes in the series speak danish and the swedes speak Swedish.
Answer: I watched the first two seasons.   I enjoyed the reality that they spoke three languages just like many in those countries would.  The Danes speak Danish and the Swedes speak Swedish.  Also, when they are on the phone to someone in a country other than Denmark or Sweden, they drop to English just as many would in real life.  This really added to the show and it came out great.


Install a lot of fonts at once

Question: I have a collection of free fonts that I want to install on my Mac. But it is too tedious to double click every one of them and then click "Install font". Is there a quick way to do this? Like a certain context menu to "install all the fonts selected" or a terminal command.
Answer: Depending on your OS X version, it should be possible to open Font Book and then drag the entire collection of fonts you wish to install from Finder onto the Font Book window.
Answer: While in Finder, hold option key and click on Go menu then choose Library. In Library, find Font folder, drag and drop the fonts into this folder. I keep my fonts organised into separate folders inside Font folder and the OS picks them up.
Comment: Putting such free fonts in a separate folder is extremely wise, since it is possible some of them will be junk and corrupt your display at some point, so you will want to be able to locate them and remove them.

Install a lot of fonts at once


What is the cheapest way to upgrade from OS X10.4 to 10.6?

Question: I have been living in the past, and it is finally catching up to me.
What is the cheapest way to upgrade from Mac OS X 10.4 to 10.6?
Answer: Spend the 30 bucks to get the 10.6 DVD and then use it for a clean install.
There's no reason to buy 10.5 so you can "upgrade" to 10.6. The 10.6 DVD is exactly the same as all the other release DVDs.
Answer: Well, the cheapest way to upgrade to Snow Leopard is to find someone who has a legal DVD but is no longer using it, and ask him/her to give it to you.
(Note: IANAL and I don't know if Apple's EULA "allows" such transfers, but you did ask for the cheapest way, and I'm assuming that you do not want to simply use Bittorrent.)
If it was me, I would definitely spend the $30 to buy it from Apple.


FQDN prompts for login info every time

Question: Our sharepoint installation used to run so that when you were logged in to the computer via active directory going to the sharepoint site it logged you in automatically. This seemed to happen only if you went to the site using the hostname. If you use a FQDN you are always prompted to log in. Is there a way to make set up sharepoint to always log someone in if they are logged into the machine using their AD credentials?
Comment: Are you talking about accessing a SharePoint site that is running on the same box that you are logged into?
Comment: No. The sharepoint box sits on the local network. Everyone has to login to there machines using AD credentials. Sharepoint is our intranet. So ideally folks shouldn't have to login to it once they've logged into their machines.
Answer: This is almost certainly a browser configuration issue, not a SharePoint issue and to handle this most companies create a policy for IE that automatically adds "*.companydomain.com" to their local Intranet zone which, by default, passes local credentials to any site on that domain.  Some companies go further and put this in the Trusted Sites zone instead, though that one does not pass credentials by default (no idea why those are the defaults but they are).  This, of course, assumes that you are using a domain like 'sharepoint.companydomain.com'.  If you are using a FQDN that does not include the company domain (like 'sharepoint.local') then you have to add that to your browser security settings as well.  Though, in this case it would probably be better to simply add "*.local" instead of the specific domain name.
To test this, you can manually add the current Sharepoint FQDN to your Intranet Zone simply by going to Tools - Internet Options - Security - Local Intranet - Sites - Advanced and adding the FQDN.  You might have to restart your browser but that should fix the issue.  If it does, then you will want to work with whoever maintains your corporate Windows policies to have them push that setting out to everyone in the company.

FQDN prompts for login info every time


Why did the Losers go to the Well House?

Question: I read the book a long time ago and I can't remember if there's any explanation to this, but in the 2017 adaptation of It, the Losers all just decide it's a great idea to walk right into the scary, abandoned house where they are pretty sure It lives. Did they have any sort of plan about what to do once they find Pennywise in there? Or was it just a plot device to get all of the main characters in danger?
Answer: It's pretty clearly explained by Bill that they all need to go to the Well House to both confront their fears and because It wanted to separate them, which makes them more vulnerable and less able to deal with It.
This is proven when they all decide to go their separate ways after their first group confrontation with It in the abandoned house on Neibolt Street, which almost didn't succeed because they all didn't go into the house. Not long after they go their own ways, Bev is captured by It because they had separated themselves. Therefore the only thing they can conclude is they need to work together if they have any hope of beating It.
Further allusions are made when It tells the kids they can go if they just leave him Bill, and Richie tells Bill it's all his fault these things have happened, "And now you're gonna make me have to kill this clown." They know if they let It keep Bill, then It will have successfully caused the kids to split up again, and there's no guarantee It will keep its (or is it Its?) word and leave them alone. Further, It will just pop back up in 27 years and cause problems all over again.
Answer: The first question is "did they have a plan?", and the answer is: no.
Bill was obsessively haunted by the loss of his little brother and once he had even a shred of an inkling where his brother might be, he felt he "had to" go there to save him. How? Never explained.
Any attempts to even start talking about a plan kept getting interrupted, like during the projector scene, or when the psychopathic bully shows up to literally murder them all.
At best, the plan was that if they're all together, they could hurt "it" somehow ... but even that is kind of a plothole because the hypochondriac kid was definitely freaking out when he got his arm broke, and was certainly not "part of the group" when the lady just jumped-in and stabbed "it" through the head.
The second question is "was it just a plot device [...]?", and the answer is: yes.
There was no plan, there was no explanation of where "it" came from or how to kill it. Any research that the history kid did was mostly ignored by everyone and they vaguely knew that it would disappear (probably) for 27 years, so now's (maybe) their chance.
Chance to do what? Who knows. They winged it. But apparently it all worked-out ... except for the dead cop and the literal dozens of dead children that they just left in the sewer and presumably told nobody about -- can't waste time on that, not when there's a pre-teen, blood-soaked, makeout scene that needs to happen.
As far as the plotting, pacing, and narrative of the movie: it was a wholly contrived and underwritten narrative that awkwardly forced all the kids to directly go confront a literal shapeshifting nightmare demon in the sewers under a well under an abandoned house, with no attempt to tell anyone or plan for anything.
At best, the farm kid brought the compressed-air bolt gun, but then the "steaks" were raised by having them lose all but one can of compressed air. And then the only other planned main weapon was when the loudmouth kid gave Bill a bunch of fence-posts that he never actually even attempted to use -- despite numerous chances. Conveniently, there was a baseball bat for the loudmouth kid to perfectly time his Columbo speech to.
Yes, in the contrived circumstances of everything, they did "need" to go there, and to go there together, to confront it and fight it.
But the question(s) were if it was just a contrived, plot-driving lack-of-a plan, and in that light: yes, yes it definitely was.
An interesting read can be found here, for the movie that might have been: http://www.vulture.com/2017/09/how-the-new-it-movie-deals-with-the-child-orgy-scene.html


Paying bill for aveirah already done

Question: Is one allowed to pay a service fee for an aveirah which someone else has already done, in order to get some other good or service now? The case I had in mind is an animal adoption where the agency charges a fee for neutering already performed.
Comment: To understand the case: do they perform the procedure anyway on all animals in their care, or only on animals that are about to be adopted?
Comment: All animals; it's a done deal, and they are passing on the fee to the adopter.
Comment: Is neutering animals an aveirah for Gentiles?
Comment: @Shemmy it's a good question, but assume for here that the seller is a Jew.
Answer: Paying for an Aveira that was already done, is probably not a problem - especially in this case where you did not request the Aveira to be done.
In הלכות איסורי מזבח פרק ד:יב the Rambam states that if you pay a harlot after the fact, the payment does not have the status of Ethnan and can be used as a Korban. This is true even if you agreed on a price and only sent the animal later, as Yehuda did (or tried to do) with Tamar.
Comment: @msh210 yes, but it's the act that's impermissible, not the payment - no? I would think even more so with the animal, since the payment does not degrade the act any more, as opposed to the zenus.
Comment: Nice find, and +1, but I'm not sure the lack of applicability of _hilchos esnan_ implies that it's *permissible*.

Paying bill for aveirah already done


Calculating payoff date and monthly payment for a school loan?

Question:
How can I verify the minimum monthly payment number and how it breaks down into principal vs. interest if all I know is the current balance and interest rate?
How can I determine the payoff date of that loan?
Answer: 1 is pretty easy.
Interest for a month can be calculated by taking your whole interest rate dividing it by 12 and applying it to your balance.
Say your rate is 3.6%.
You divide that by 12 to get .3% interest paid per month.
Then take that rate (.003) times your balance (lets say 10000)
So your monthly interest is 30 dollars.  If you have a 35 dollar monthly payment 30 is going to pay interest 5 is being applied to principle.
for 2 you can use amortization schedules or your can just go to this Existing Loan Calculator which makes it easy for you to compare what adding a few extra dollars to your payment will do to your pay off date.
Comment: I guess what confuses me is why the rate is quoted as an annual thing instead of a monthly rate? Why wouldn't the rate be given to you in the form of .003 but instead .036 if we're just going to divide it by 12 anyway? What does the yearly rate tell/what use does it serve? Does it just imply that .036*current balance = interest we'd pay over a year?
Comment: After calculating payoff date, does it make sense to say that the number of months until that payoff date * monthly payment = total amount to pay over lifetime? And then total amount to pay over lifetime - current balance = the amount of money the lender would gain as a result of interest (the amount of money I'd be saving by paying off now instead of later, etc?)
Comment: @AgainstASicilian - Because this is the standard way of reporting the interest rate of a loan.  This allows you to easily compare loan offers.  There are actually regulations that require the loans be expressed in this manner designed to prevent consumers from being taken advantage of by banks offering interests rates that appear low because they are using non standard range calculations.
Comment: @AgainstASicilian - That is correct.  If you it off  over the life of the loan you will spend that much more money.  Than if you pay it off now.  And Actually making extra payments early on in the loan is more beneficial (long term) than making them towards the end.


Is there an effort to prove phonemes?

Question: For 44 claimed phonemes, we need 44*43/2 = 946 minimal pairs. If we can't find even one of them, then it is possible to claim that English has 43 phonemes and not 44 due to complementary distribution (with a complicated rule). Hence I'm interested if there is any work trying to count phonemes rigorously?
Comment: Generally, no, because Occam's Razor still applies. You may not be able to provide any minimal pairs that prove beyond a shadow of a doubt that /a/ and /p/ are not complementarily distributed allophones of a single phoneme in English, but you'll have a hell of a job convincing anyone that they are. The classic example is /h/ and /ŋ/, which _are_ in (virtually) complementary distribution, but are still not seriously considered allophones by anyone.
Comment: Minimal pairs often form cliques, reducing the number of words to demonstrate them significantly, e.g., for English *bail, sail, dale, fail, gale, hail, jail, mail, nail, pale, tail, whale, ...*
Comment: Unfortunately, I can't undo my upvote for your comment @JanusBahsJacquet, but I don't think that Occam's Razor applies here. However, anti-intuitive it may be for /a/ and /p/ to be a single phoneme, it would suit Occam's Razor perfectly if they were.
Answer: In theory, any language could be analyzed as having only two phonemes, /0/ and /1/. Then we could say [p] is the realization of /00000/, and [t] is the realization of /00001/, and [k] is the realization of /00010/, and so on.
The problem is, this isn't an especially useful analysis. It doesn't reveal any new insights about the language, or make it easier to discuss sound changes, or anything like that.
Since phonemes are fundamentally a theoretical construct, not an externally-measurable one, what really matters is how useful they are. Do they explain the data in a concise way, and make it easier to analyze it? That's the true metric, more so than minimal pairs. Even though there's never going to be a minimal pair between [h] and [ŋ] in English (one only appears in the onset of a syllable, the other only in the coda), they act completely differently, and it doesn't really help anything to call them allophones.
For another illustrative example, look at different analyses of Mandarin vowels. Some linguists say that /y/ is phonemic in Mandarin, while others say it's merely an allophone of /ɥ/. But you'll never find a minimal pair, because linguists who prefer the first analysis say that every syllable needs a vowel in it, so you'll never see /ɥ/ alone without a vowel. (Linguists who prefer the second analysis say you can have syllables without phonemic vowels in them, and when you've got a /ɥ/ in a vowel-less syllable, you get [y].) Neither analysis is necessarily right or wrong, since both of them can explain all the data. So it comes down to elegance, utility, and personal preference.
Comment: If you really wanted to, I think you could analyze "song is" and "saw his" as a minimal pair between /ŋ/ and /h/. It's not always 100% clear where a syllable-break is, and the location of a syllable break often seems to be a *consequence* of the surrounding phonemes as much as a *constraint* on them.
Comment: @JanusBahsJacquet in that sort of context you also find things that aren't phonemes in a given language, such as clicks in "tsk"...
Comment: You can actually have a minimal pair between /h/ and /ŋ/, though it's wordness is questionable: the derisive exclamation [hŋ̩˦˩] vs the exasperated exclamation [ŋ̩h˦˩]. Is that particularly useful, though? No, not really. That sort of context is exactly where you'll also find minimal tonal pairs ('hmm!' vs 'hmm?'), and nobody (sane) would claim that English is a tonal language.
Comment: This sounds similar to the question of whether physicists can produce a correct description of "reality". Physical theories are models, evaluated as to their usefulness in making predictions. Reality is a metaphysical issue, possibly unknowable.
Comment: @ruakh That example relies on an accent feature: the cot/caught merger. Without that merger, the vowel of "song" is one of English's short lax vowels that can't occur word-finally; and the vowel of "saw" is long, and as such cannot precede [ŋ]. (Modulo marginal unwordy English utterances.)
Answer: Even if you had a full set of minimal pairs, that actually would not rigorously establish the number of phonemes in English because it doesn't tell you how the phonemes are segmented: you could make the number larger by treating phoneme sequences in the current analysis (like /sw/ /tw/ /dw/) as single phonemes, or smaller by treating single phonemes in the current analyses as sequences (e.g. [s] as /hz/).
In general, I don't think it is common to seriously consider minimal pairs to be the primary practical or theoretical criterion for establishing a phoneme inventory. They are a useful way of demonstrating a phonemic contrast.
Comment: @ArnaudFournet: you just gave an example in your comment of an English phoneme that cannot occur word finally ... so clearly, it's not impossible for a phoneme to be absent in that position. Linguists disagree on whether to analyze "qu" in Latin as a sequence /kw/ or a labialized velar phoneme /kʷ/, even though "qu" cannot occur at the end of a Latin word (or syllable). It might not be a good idea to consider sw tw dw phonemes, but I think it's going a bit too far to say that this analysis can be definitely ruled out.
Comment: @ArnaudFournet Sure, kw acts different from other Cw clusters in Latin (it never splits across syllables), but that can still be explained away: maybe w acts different after velars because it's got a velar articulation itself. I personally prefer analyzing it as its own phoneme for a variety of reasons but it's possible to defend the other analysis too.
Comment: @ArnaudFournet Latin has a phoneme /w/, so the two-phoneme analysis would be that *qu* = /kw/, not /ku/; the stress of *loquitur* would be the same whether it's /lokwitur/ or /lokʷitur/.
Comment: this is not correct. For example, in English, sw tw dw cannot be considered phonemes, because, among other things, they do not occur word-finally, so they don't behave like regular phonemes, which normally can appear anywhere in a word (apart from the famous exception of h / ŋ̩).
Comment: As regards Latin, qu is clearly one phoneme and not a sequence of two phonemes k+u. This is shown by forms like lo"quitur with stress on o. If u in qu would count as a potential vowel, then it should be stressed loqu"itur.
Answer: As an addendum to the other answers, I'd like to observe that some languages lend themselves to minimal pairs, whereas others do not. This is a function of syllable structure, and probably to some extent the size of the phonetic/phonemic inventory as well. If all of your words have CV or CVC syllables, then it's going to be easy to find minimal pairs. If you allow CCVCCC, it's going to be harder. The fewer syllable types, the more languages are going to have to depend (so to speak) on words that are only minimally different.
I've experienced this personally: in an Iranian language I studied it was impossible or almost impossible to get minimal pairs for a contrast that was clearly phonemic, based on native speaker intuitions. And there were very few minimal pairs of any sort. On the other hand, in a Turkic language, I run into minimal pairs constantly, without even having to think about it.
Answer: Phonemes, like morphemes, syllables, words, sentences are analytical tools. Like all tools, they are constructs of culture. A phoneme is no more real than the concept 'word.'
Answer: You don't need to have minimal pairs that contrasts all phonemes with the others.
Phonemes are bundles of articulatory or phonetic features. If you have a pair that opposes p to t, and a pair that opposes t to d, and a pair for p vs b, then you don't need a pair for b vs d, because you already showed that labial is not dental, and voiceless is not voiced.
Comment: Doesn't this type of argument incorrectly predict that Arabic speakers would have a robust phonemic distinction between /b/ and /p/, since there is a distinction in Arabic between /t/ and /d/? But in fact, my understanding is that some Arabic speakers collapse /p/ and /b/ even in vocabulary of foreign origin, which seems to indicate that for such speakers the absence of /p/ in native vocabulary is not just an accidental gap, but corresponds to a gap in their phonemic inventory
Comment: p does not exist in the first place (except in some dialects).

Is there an effort to prove phonemes?


Media player that will properly loop a file with no intervening silence

Question: I've created a WAV file that loops perfectly, as verified by using Loop Play in the Audacity audio editor.  I want to keep the file small and have my media player loop it rather than having the file repeat its content over and over.  I used to use Media Player Classic for this, but I just tried with the latest version and it pauses slightly before looping (just like standard WMP, VLC, and other clients I've tried).  Are there any media players that will do this properly with no intervening gap?  Opening it in Audacity and manually starting a loop is more hassle than I'm interested in doing every time I want to listen.
Comment: I have never noticed a significant delay in looping with VLC so it is probably a buffering problem - have you tried putting two copies of the file into a playlist and looping the playlist?
Comment: @SteveBarnes I don't have that enabled and my reads for any other purpose are quite fast.  Using an SSD and so on.  The file is also 13 kB.
Comment: There are plans to [add gapless playback in VLC Player 4.0](https://www.neowin.net/news/vlc-40-to-drop-support-for-older-platforms-while-adding-new-ui-and-gapless-playback).
Comment: Could you please list all the clients you have tried?
Comment: @SteveBarnes No improvement in VLC with a playlist.  WMP actually does a bit better with a playlist but there's still noticeable delay.
Comment: Sounds like you might be hitting hardware problems rather than SW - i.e. it is taking a perceptible time to read enough data from the hard disk to start playing - one thought *some* anti-virus programs can cause this when "On Access Scanning" is enabled...
Comment: Sorry, was looking at the wrong one -- it's ~2.2 MB.  Less than your average MP3.
Comment: iTunes (too short to be an answer, but of all the software I tried it was the only one that flawlessly worked)
Comment: It's 2022 and this is STILL a problem... just tried SMPlayer, VLC media player, WMP, and Groove on Windows and NONE of them work properly (e.g. gapless looped playing, which seems like a basic feature i.e. worthless without it)
Answer: Foobar2000 should support gapless playback - its supposed to work for lossless tracks, and WAV is, well not compressed, so is as lossless as they come. You'll likely need to create a playlist with a single track, and pick "Repeat(Track)" under Playback. You might also consider converting it to flac and playing around with metadata as suggested here, if that dosen't work
Answer: Mplayer is a media player for Linux and Windows that does gapless playback (no silence between tracks) including in loop mode. On the command line this is achieved with the -loop 0 option (infinite loop).

MPlayer is a movie player which runs on many systems (see the documentation). It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV and even H.264 movies.

If you want a graphical interface for Mplayer, check SMplayer
Comment: It's 2022 and SMPlayer under Windows does NOT work properly. Is there some setting required for it to properly invoke mplayer?
Comment: `mplayer.exe -loop 0` has a *significant* delay between instances of the loop.
Comment: `mplayer.exe  -loop 0` isn't quite seamless, there's a loud "click" or "pop" in between each loop.
Comment: [mpv](https://mpv.io/) is a modern fork of mplayer2 and supports gapless playback.
Answer: I think you may have inadvertently answered your own question. You say an older version of Media Player Classic worked the way you like. Well, Media Player Classic is a portable app, meaning you can use it without installing anything. So get the version you used to use, and use that for that file.
If that doesn't work, then the problem is either something on your system that has changed, or you've misremembered what app you previously used.
Comment: If I knew the version I used years ago I would be posting here.  This isn't helpful.
Comment: @MatthewRead That's too bad. I wish that information was in your Question. At least my Answer got your Question bumped and is why you now have a few other programs to try. And, if those fail, I will point out that you can at least guess the early version based on approximately how long ago it was.
Comment: How can I loop on that classic player? There is no button.
Comment: @modiX From what I found in a Google search, it's in the menu (as Repeat File) in newer versions, and in the settings in older versions.
Answer: Assuming that you need this to loop a small file and that you are not worried about good looking GUI why not:

Download and install Python.
Download and install PyAudio.
Write a simple script that:

reads the whole file into RAM and Initialise the Audio port for output and
in a blocking loop write the data you read above to the Audio Output

Or even - if you are on windows:

Download and install Python
Use a script like:
import winsound as w
data = open.("YourWavFile.wav", "rb").read(-1)
while(True):
   w.PlaySound(data, w.SND_MEMORY | w.SND_NOSTOP)

Stop with control-C

You can even do this directly in the python console and if you need a GUI you could add one using a variety of libraries.
Comment: PlaySound() seems to expect a string for its first argument (`TypeError: must be str or None, not bytes`), so this doesn't work.  Using the filename for that string does not work either.  In any case, I am looking for a proper media player.
Comment: Sounds like there may be a problem with WinSound on Python 3 - *there is Issue 11620** should work with Python 2.7.x but if you need a GUI...
Comment: Although `winsound` appears to be a standard module, it isn't found on my cygwin system.
Answer: There's a software called djv view,try that out.Loops like butter.
It can even show exr files and that's a super plus.


exe using LGPLv3 lib: must I also ship the exe's object files?

Question: If I ship a closed-source .exe that dynamically links to an LGPLv3 library  (such as Qt), must I also ship the .obj files from which I built the .exe?
This podcast at 34:30-36:00 claims so, and also explains that shipping the .obj files lets the end user run a decompiler to reconstruct my source code.
Comment: I think the information you are quoting is coming (second hand) from the Qt company. I'd have to listen to the whole context to see where he is getting the information from, but keep in mind that the Qt Company often does not paint the whole picture on LGPL licensing. Keep in mind that Qt wants to try hard to sell you on its commercial licenses. Also it is true that some components of Qt are GPL only, so as always you need to look carefully at what you are using.
Answer: The LGPL license does not require you to ship .obj/.o files for your closed-source code. The LGPL requires that an end-user is able to use the closed-source part of the complete program with a different build of the LGPL code and you are required to provide the files necessary to do that.
For a statically linked executable, this indeed means that you must ship the .obj/.o files, as you would need to re-link the executable to get it to use the new LGPL code.
For a dynamically linked executable, especially when the LGPL code is dynamically linked, the end-user just has to make sure that the LGPL library is in a place where the OS will pick it up and the loader that is part of the OS will do the rest.

The podcast is also wrong about the risk of people being able to reconstruct your source code from an .obj/.o file.
Decompilers indeed exist, but they can reconstruct some form of source code even from the final executable, but you probably would not recognize it as your source code.
First of all, optimizations can do really funny things to the code, like unrolling loops, inlining functions, reordering statements or creating new functions out of sub-expressions that occur multiple times.
Secondly, during compilation names of types, functions and variables are irrevocably lost, so the decompiler has to make something up that will invariably be much less descriptive that what you used. Object files make decompilation to readable source code slightly easier, because publicly accessible names will still exist in those files to facilitate the linker.
The best chance of reconstructing the source code exists when debug information is present, but why would anyone ship files with debug information regarding proprietary code.
Comment: "Object files are at a slight disadvantage here" - why is this a disadvantage? If names are available in the object files it seems like an advantage for decompilers.
Comment: @Brandin In the context of the question's linked podcast, the successful operation of disassemblers is viewed as a disadvantage. The speaker there is averse to sharing object files for fear that they will be more easily disassembled. (Though probably to avoid the exact confusion that just occurred, that sentence should be made more clear.)
Comment: @apsillers Yes, I see now. A disadvantage to someone who doesn't want someone to reverse engineer the code. I guess I was thinking from the perspective of the person trying to reverse engineer, so then it would be an advantage for me.
Comment: I rephrased that sentence to remove the ambiguity.


How to Requeue jobs to Resque?

Question: I am new to Resque and I have been using it in production for the past 2 months, I now have a problem where I want my jobs to be re-queued in the queue if there is an exception. My jobs make about 50 external HTTP calls and some of the calls fail due to latency and sometimes the service is down. I am exploring https://github.com/lantins/resque-retry but I am trying to understand if resque-retry retries the job or re-queues it, I don't want the failed job to get a precedence over the other jobs in this queue, I want it to be added to the queue again. Also, all my HTTP calls have a rescue block, while using resque-retry do I have to make some changes to this class(which is called from Resque perform) so that it gets retried/re-queued.
Comment: I dont think the failed job get any higher precedence over the other job since in resque term it only a message in the queue the only precedence it can get is perhaps if the queues from from which the failed job message was consumed is of higher precedence over the other queue but if the same queue has some message in it and failed job message arrive then it will function as normal queue fashion i.e FIFO order
Answer: I dont think the failed job get any higher precedence over the other jobs in same queues
since in resque term it only a message in the queues the only precedence
it can get is perhaps if the queues from from which the failed job message was consumed
is of higher precedence over the other queues but if the same queue has some message in it
and failed job message arrive then it will function just  as normal queue fashion i.e FIFO
order

How to Requeue jobs to Resque?


What was the role of Jackie Costigan?

Question: Billy Costigan's uncle Jackie is mentioned in The Departed with Queenan and Dignam, then again during Sullivan's briefing scene. How was he important to Frank Costello's crew?
Answer: It's never mentioned what his exact role was. All we know is that he was working for Costello as a probably not too important but loyal mobster.
We learn that he probably was no stranger to violence when Costello approaches Billy:

Costello [Talking about Billies father] No. He kept his own counsel. He never wanted money. You can't do anything with a man like that. You're Uncle Jackie - he also would kill my entire fucking family if he saw me here with you. And I think about this.

So Costello is implying that Jackie was a different man than his brother William Costigan. He spoke his mind and could be motivated with money.
A later conversation makes it clear that Jackie had earned his trust in the crew:

Frank Costello: [talking about Costigan] Do you trust him?
Mr. French: Well these days, who's reliable?
Frank Costello: His uncle Jackie was. Yeah, you can't trust a guy acts like he's got nothing to lose.

He got killed when Billy was still young:

Ellerby: By organized crime in the city, you know who we mean - that's Jackie Costigan, that's an old picture. Jackie met his demise. Last known photograph.

(all quotes taken from IMDB)
That is pretty much all I could find regarding Jackie. He did not play a big role in the movie, the main purpose of the character was to give Billy Costigan a family connection to the mob. He is the reason Costello approached and recruited him, because he knew and trusted Jackie and saw that potential in Jackie's nephew as well.

What was the role of Jackie Costigan?


How do I substitute skim milk for dry milk in a muffin recipe?

Question: My muffin recipe calls for 1 1/3 cups of nonfat dry milk. Other than the 4 eggs, there is no other liquid. How much skim milk would I substitute for the dry milk?
Answer: You don't, it will not work.
You want to substitute liquid milk for dried milk.
What you don't realise is that the dried milk in such a recipe is acting as a bulking agent, ie. the dried milk is already substituting for some flour.
If you don't have dried milk, you should look for another recipe that doesn't use it, if you want to be certain of reliable results.
Answer: I have to respectfully dissagree with the above post.  2 cups of water and 1 cup of dry milk gives you 2 cups if milk... it does not add to the bulk.  You can however, substitute scalded milk for powdered milk.  Powedered milk is called for generalky when regular milk enzymes will react with your ingredients and make an inferior product, especialky in bread making.  Scalding the milk removes the enzymes.
Comment: While in general you *can* substitute in either direction between powdered milk plus water for fresh liquid milk, as asked in the original question, there was no additional liquid to remove from the recipe.  The dried milk is being used directly as an ingredient in its own right.  Substituting fresh milk would certainly make up for the milk solids and sugars, but it would also add a large amount of water making the original recipe unworkable.


Despite installing Ubuntu alongside Windows, after ejecting CD, unconditionally boots Windows

Question: I'm trying to install Ubuntu 12.04 LTS alongside Win 7, but each time it gets past the (install Ubuntu in Windows 7) option, it just stops and ejects the CD asking me to press the enter key. After this, it just boots back into Windows. And when I try to install with my network connection enabled, I get a (6136) terminated by signal 15 error (NM Dispatcher action caught signal 15 shutting down.) Unallocated space - 70GB on C drive.
Answer: You should use Wubi to install 12.04 LTS on your Windows machine. Here is a Ubuntu link to if specifically for 12.04 LTS.
http://www.ubuntu.com/download/desktop/windows-installer
Comment: Thanks for the reply. I'll give that a try. Will I still need to use the same disk I put the Ubuntu.ISO on?


The possible preferences of investors for higher than first 2 moments of return distribution?

Question: Can anyone explain in an intuitive manner a justification for possible preferences of investors for moments of return distribution beyond the first two moments (i.e. mean and variance). For example, why it is often argued that positive skewed distributions are preferred to negative ones?
Is it related to known concept of risk aversion?
Comment: A preference for positive skewness can be justified by Prospect Theory, specifically the idea that losses are more painful than gains are pleasant.
Comment: Agree on the prospect theory comment. This newspaper article provides a nice summary: https://www.ft.com/content/329e1eb0-fd28-11e3-bc93-00144feab7de
Answer: Investor preferences for higher level moments are probably most easily explained by behavioral finance. Investors' tendency to overvalue out-sized positive and negative outcomes, such as gamblers' willingness to play negative expectancy casino games, is consistent with many of the intuitions underlying Prospect Theory. There are several possible behavioral biases which underlie these cogntitive errors. For example, the recency effect is thought to cause investors to overestimate the probability of outsized winnings based on forgetfulness of losses and or heightened focus on others' recent winnings. Thus, it is thought that investors would be motivated moreso by the mean than the median ("typical") outcome.
Preferences for higher level moments are thought to work similarly. Since the skew is positive for a distribution where the mean exceeds the median, the recency bias predicts that securities with positive historical and/or implied skewness are more likely to have lower future returns since they are also more likely to be fully priced. This intuition is broadly supported by literature on cross-sectional asset returns.
Ang, Hodrick, Xing, and Zhang (2008) summarize this view:

Barberis and Huang (2005) develop a behavioral setting in which the
  individual skewness of stock returns may be priced.8 Under the
  cumulative prospect theory preferences of Tversky and Kahneman (1992),
  investors transform objective probabilities using a weighting function
  that overweights the tails of the probability distribution. This
  causes positively skewed securities to become overpriced and to earn
  negative average excess returns.

Additionally, the cross-section of equity returns themselves tend to be positively skewed. Two recent papers demonstrate that individual stocks' returns, in aggregate, do not outperform bonds. I.e., most of an index' performance is attributable to a few outliers. Motivated by these outliers, investors tend to in aggregate seek out future large winners thus resulting in their relative over-valuation.
Bessembinder (2017) finds:

Four out of every seven common stocks that have appeared in the CRSP
  database since 1926 have lifetime buy-and-hold returns less than
  one-month Treasuries. When stated in terms of lifetime dollar wealth
  creation, the best-performing four percent of listed companies explain
  the net gain for the entire U.S. stock market since 1926, as other
  stocks collectively matched Treasury bills. These results highlight
  the important role of positive skewness in the distribution of
  individual stock returns, attributable both to skewness in monthly
  returns and to the effects of compounding. The results help to explain
  why poorly-diversified active strategies most often underperform
  market averages.

Heaton, Polson, Witte (2017) also find:

...active equity managers tend to underperform a benchmark index. We
  motivate our model with the empirical observation that the best
  performing stocks in a broad market index often perform much better
  than the other stocks in the index. Randomly selecting a subset of
  securities from the index may dramatically increase the chance of
  underperforming the index. The relative likelihood of underperformance
  by investors choosing active management likely is much more important
  than the loss to those same investors from the higher fees for active
  management relative to passive index investing. Thus, active
  management may be even more challenging than previously believed, and
  the stakes for finding the best active managers may be larger than
  previously assumed.

Thus the desire for positive skew might make sense in the context that equity markets' out-performance is primarily due to cross-sectional skewness.
EDIT
On further research, it appears that investors' preferences for positive skew can help explain why realized skew is negatively correlated to equity returns. If investors have a preference for stocks with positive skew, then they will bid up prices of stocks which in turn results in lower future returns.
In Amaya Vasquez (2015), the authors indicate:

Buying stocks in the lowest realized skewness decile and selling
  stocks in the highest realized skewness decile generates an average
  return of 19 basis points the following week with a t-statistic of
  3.70. This result is robust across a wide variety of implementations and is not captured by the Fama-French and Carhart factors. The
  relation between realized kurtosis and next week׳s stock returns is
  positive but not always significant. We do not find a strong relation
  between realized volatility and next week׳s stock returns.

Furthermore, that stocks with higher realized skewness of return tend to be more expensive might also help explain their sensitivity to earnings shocks.
The finding of positive correlation between realized volatility and forward equity returns is disputed in the literature. A positive relationship can be seen as an artifact of investors' aversion to perceived risk, for which realized variation is often a proxy. However, there are many other findings which contradict this one... namely a class of phenomena often called "betting against beta". Where they consistently do agree is on the positive relationship between equity returns and the normalized differences between IV and RV.
Answer: The argument I have seen for higher order moments follows from an expansion of log wealth:
\begin{align}
log(W) &= log(W_0 (1+r))\\
 &= log(W_0) + log(1 + E[r] + r - E[r])\\
 &= log(W_0) + log(1 + E[r]) + log\left(1 + \frac{r - E[r]}{1 + E[r]}\right),
\end{align}
where $W_0$ is initial wealth and $r$ are simple returns. Then apply a Taylor series expansion to the last log to get
\begin{align}
log(W) &= log(W_0) + log(1 + E[r]) + \frac{r - E[r]}{1 + E[r]}
-\frac{1}{2}\left(\frac{r - E[r]}{1 + E[r]}\right)^2
+\frac{1}{3}\left(\frac{r - E[r]}{1 + E[r]}\right)^3
\ldots,
\end{align}
Now take expectations:
\begin{align}
E\left[log(W)\right] &= log(W_0) + log(1 + E[r])
-\frac{1}{2}\frac{E\left[\left(r - E[r]\right)^2\right]}{\left(1 + E[r]\right)^2}
+\frac{1}{3}\frac{E\left[\left(r - E[r]\right)^3\right]}{\left(1 + E[r]\right)^3}
\ldots,
\end{align}
Thus an investor maximizing expected log wealth should have a positive preference for larger odd order moments and smaller even order moments.
There is a different line of reasoning based on maximizing probability of a win which is based on Roy's criterion. Here the investor wishes to maximize
$$
\operatorname{Pr}\left(W > W_0(1+r_1)\right),
$$
for some fixed return value $r_1$. The math is a bit more complicated here, but one result is that the preference for higher order moments can have mixed signs. For example, depending on the Sharpe ratio for the returns, an investor can have preference for either higher skew or lower skew in returns. An investor with a short-term view who needs to clear a certain threshold (like your investment manager) will sell lottery tickets to chase small returns, risking the possibility of a huge payout; the investor with long term view would buy lottery tickets and sacrifice their cost.
Answer: I think your assumption of "why it is often argued that positive skewed distributions are preferred to negative ones? Is it related to known concept of risk aversion?" is incorrect or at least partially wrong.
For most of types of financial instruments, such as most stocks and indices, they show negative skewness on their return distributions. That's exactly the characteristics of these instruments, as the historical data show downside risk are less frequent but more severe, or people always call "fat tails". However, lots of commodities do show positive skewness, especially the ones with high elasticity on supply curve, such as grains, livestock, energy etc.
From forward-looking perspective, skewness also demonstrated in option world, that's why puts are usually much more expensive than calls with same level of deltas(here use stocks as examples again). However, the tail implied from option market is actually even fatter than historical real returns, that's caused by risk aversion as lots of market participants are willing to pay more on puts for protection, which you can also understand it as demand-driven.
For your question of moments, I would say two moments can't well address the real feature of returns distributions on financial instruments. Using stocks as examples one more time, they usually show way higher kurtosis and some other features. So if you fit return data to a normal distribution, the fitting will be very ugly. I would like to introduce you a distribution called meixner distribution, which is a 4-parameter distribution fits return data the best, as far as I know.
https://www.eurandom.tue.nl/reports/2002/004-report.pdf


Indoor-alternatives to kitchen stove

Question: I am a kitchen-brewer doing 5 gls all-grain batches and am frustrated because the kitchen stove is lacking the last bit of power to yield a nice rolling boil. Are there any indoor-alternatives to the stove?
Comment: You should find a handful of good answers here: http://homebrew.stackexchange.com/questions/2677/how-to-brew-all-grain-indoors.  Voting to close as duplicate.
Comment: Seconding the dupe.
Answer: I've had the same problem on our small apartment stove, and the best trick I could come up wih was to preheat water in a separate kettle while I'm doing other prep work so I can have hot water on hand rather than try to bring 3 gallons to a boil all at once.
Answer: Electric brewing with heat sticks.  Or you can supplement your stove top with a little extra heating capacity using a heat stick.
Start here with this heat stick page
Listen to the April 29th 2010 Electric Brewing episode at Basic Brewing Radio.
Comment: I've been using heatsticks for brew-in-a-bag AG for about 6 months now. I built two 1500W sticks (one with a right angle). I have to use two separate circuits, but I love the system. One mod I want to make to mine is adding a potentiometer to have a variable heat level. 2 sticks boils a bit violently with full volume - I'd love to have about 1.25-1.5x when I get up to boil. As a side note, I doubt I'll ever go to gas even when I have access to the great outdoors for brewing or move up to a larger batch size; electricity is too convenient!
Answer: One thing I did in my apartment was to get a griddle that would cover 2 burners.  Put both burners on high, with the griddle on top.  Put the brew kettle on the middle of the griddle.  You get somewhere around 1.5 the BTUs of 1 burner (some is lost to waste heat, unless you rig up a proper way to hold that heat in, which I never really investigated).

Indoor-alternatives to kitchen stove


Would it be worth buying better pickups for a cheap bass guitar?

Question: I bought a really cheap bass guitar second hand. It works fine, but I'm wondering if it would sound better with more expensive pickups. Since I got it at a market for around £20 I'm guessing that the pickups on it are fairly bad. if I were to invest in new pickups what difference would it make? And would it be worth it? I play and perform every now and then in a jazz band.
Comment: Honestly, the pickups are basically the only part of a bass that can be manufactured with _decent_ quality for a price that makes a £20 instrument. Perhaps it would overall sound better with a particular replacement PU, but that wouldn't so much mean the pickup is better as _it's more forgiving_, as in, it simply ignores parts of the signal where that bass particularly sucks. I would call such a pickup rather _worse_, in the general picture (since for a good instrument, you don't want any frequencies swallowed). — Don't spend any money on trying to "improve" that bass, better get a new one...
Comment: What make is Bass?
Answer: It very much depends on the guitar.  Do you have any idea what it cost new and how old it is?  If you have a new bass guitar for £20, any amount of money you put in it is wasted.  It will be CNC-machined from cheap wood, and in few years the neck will be warped enough to render it unplayable.
If it is reasonably old and works fine, chances are that it will stay that way for a reasonable amount of time.  "Works fine" means different things to different people: try getting a hold of other people's instruments now and then, just to have some point of comparison.
New pickups will not change the mechanics of the guitar, the precision with which it is fretted, the clearances between string and frets, how well it is in tune (obviously after tuning) and a few other things.  But the pickups are a dominant part of the sound character.
Whether they are worth changing depends on what kind of thing you find particularly worthy of improvement with this guitar.
Now the question is why you got the guitar cheap.  If you got it cheap because it was in some mouldy basement and is rusty all over, it is worth noting that this does not in any tangible way affect the pickup quality.  The pickups don't really get noticeably worse but rather fail completely at one point of time (coil damage).  Of course, they may become hard to adjust before then, but the sound itself is pretty much the same.
The pots and switches and connectors are more likely to cause trouble when corroded.  Using tuner spray (on the pots) and/or contact spray on switches and connectors may help with that.
Comment: http://www.gear4music.com/Guitar-and-Bass/LA-Bass-Guitar-by-Gear4music-Black/1B
Comment: I found it here, its quite new definitely not a rusty old instrument. When I bought it one of the strap nuts was missing, that could have been a reason for it being so cheap.
Comment: @KeirLewis, I'd recommend some caution with these Gear4Music basses. Although I use Gear4Music regularly, for buying equipment for both me and my pupils, several of my pupils have had problems with these "own-brand" basses, particularly with necks warping after a relatively small amount of time. Although I think Gear4Music sell some really good value stuff, I think their "own-brand" guitars and basses are really not good. This makes sense, a Fender Squier costs about £200 new, these cost under £100...
Answer: I would say yes, but don't expect miracles. A cheap bass Is and always will be a cheap bass. Ofcourse it will Improve the sound but it won't sound like a good bass. If you can't afford a better bass then go right ahead and change the pickups
Comment: "Of course it will improve the sound" – actually not "of course". In fact most good pickups would probably not make that instrument sound _any_ better; some might even make it worse! For magnetic pickups there isn't really a meaningful way to rate "absolute quality": they all sound _different_, but what's _good_ depends only on how good a pickup fits a particular instrument. — Sure, super-cheap pickups may have objective problems (microphony) or simply not work because the wire's broken. But as far as the sound itself is concerned, good/bad isn't really correlated with cheap/expensive at all.


What is the "please-remove-this-tag" tag?

Question: I saw that please-remove-this-tag has been added to some questions, and then removed.
What is the purpose of that tag?
Is it a tag that has been renamed, and then removed? If this is the case, why should a tag be renamed, and then removed from questions?
Answer: It's explained in the tag wiki: https://cooking.stackexchange.com/tags/please-remove-this-tag/info
Basically, if there's a tag in use that we want to remove, rather than mass editing and pushing stuff to the top, we merge the tag to "plese remove" and then remove it a couple of questions at a time.
Comment: @aaronut, right. That's why I linked that in my answer. ;o)
Comment: I could have sworn that the answer linked to the original meta question... *sigh* must be more tired than I realized.
Answer: I've just realized that because the tag itself will eventually disappear (as it already has), so will the wiki, and now the link in yossarian's answer is broken. So I'm including the original wiki in this answer for reference:
Excerpt:

This tag is a placeholder tag intended to replace another, high-risk problem tag. Please review the full tag information (wiki) for instructions and guidelines for removal

Wiki:

What is this tag for?
please-remove-this-tag is used to help in the cleanup of high-risk problem tags.
What kind of tags are a problem?
A high-risk problem tag is defined as one that is:

Vague, ambiguous, misleading, regionally-dependent, meta, or otherwise prone to misinterpretation and incorrect or inconsistent usage.

Easily discoverable - typically composed of common keywords present in the question.

Already in widespread use, such that an immediate manual removal of all instances of the tag would bump newer questions off the front page.

Such tags are considered to be serious problems because their usage tends to become both more common and more divergent over time - even amongst experienced members.
When it is impractical to "hand-sort" one of these tags due to volume, a moderator may merge the problem tag with please-remove-this-tag in order to quickly eliminate it from the tags page and any tag suggestion boxes, as well as leave a clear and easily-recognizable marker on the question itself that it will eventually require retagging.
When and how should I remove it?
Any members with the retag question privilege may perform a retag.  See the aforementioned link for specific instructions on how to retag any questions.
Some additional guidelines for this specific retag:

Pay attention to other question tags.  More often than not, questions with one bad tag will have other bad tags, and/or be missing other important tags.  Don't just remove the placeholder; treat it as any other retag and consider which tags would actually be most appropriate for the question.

Don't mass-retag. Limit your retag efforts according to our daily question activity; at the moment, we recommend no more than 10 retags on a typical day, less on weekends.  Be mindful of other members potentially doing the same thing; if you see more than a few old questions already on the front page, let it be - the placeholder will still be there tomorrow.

Don't retag closed questions. Closed questions are the short list for eventual deletion, at which point it won't matter what tags they have.  Don't add noise to the front page by bumping a question that has been deemed off-topic or inappropriate.

Prioritize questions that are already on the front page. New or bumped questions have their tags on display for the whole world to see.  If a front-page question has bad tags (including this placeholder), then don't hesitate or worry about site activity - retag it now.

More questions?
Check these posts for answers:

Discouraging the proliferation of bad tags: Proposal
When should I retag a question?

If you still have questions, don't hesitate to ask them on Meta Seasoned Advice.


Can I use Ubuntu and Windows 7 simply by using the windows installer on ubuntu.com?

Question: When i'm done using Windows/Ubuntu, can I just reboot and select the other from the boot menu?
Answer: Yes, but it is recommended that you have Windows check the disk before installing and correct any file system errors.
After installation you will be presented with a boot menu(supplied by Windows) to boot to either Windows or Ubuntu.  You make your selection there and then it boots into the  selected OS.  If booting into Ubuntu you may also see the Ubuntu Grub screen.  If so you will need to select the Linux version you want to run....the top is the newest under that will be "Previous Versions" that will allow you to boot into the older kernels if needed(after a fresh install there will only be the one selection, the Previous menu selection will appear if and when you update to the newer kernel.
The Grub can be shown or hidden by editing your /ect/default/grub file.....there are plenty of questions on askubuntu about doing that so I will not take the space here to repeat the information.
HERE is the instruction page for Wubi from the developers of Wubi it has rather detailed instructions and some FAQ's
HERE is the detailed Ubuntu page on Wubi that includes the same instructions as the above link and some advanced troubleshooting and a more detailed FAQ.
Answer: Yes, you can simply reboot to the other OS. It also uses Windows Boot Manager instead of GRUB.


Music theory - transposing

Question: I want to play this piece originally for cello. I need this music for a flute. Cello and flutes are both in the key of C, but cello is a non transposing instrument in the bass clef. How can I do this?
Comment: Transpose it up until to you are completely in the range of a flute.
Comment: Unfortunately violoncello has a tremendous range of five octaves. Due to my knowledge you have to be pretty good to reach four octaves, on the flute see [Wikipedia](https://en.wikipedia.org/wiki/Range_(music)), Hopefully the piece in question does not require it, but in the worst case you have to use different octave transpositions.
Comment: What is your question?  Do you want to do this in software, or are you simply unaware of the position of middle-C in each clef?
Comment: Since the lowest note of the flute (without a B foot) is middle C, and the lowest note of the cello is cello C, two octaves lower, you might try transposing the cello music two octaves higher.
Answer: You may very well find yourself having to arrange the piece, rather than transpose/transcribe it. As @guidot notes, the range of the instruments differ not only in locus, but in width - the 'cello has a wider easily-usable range than the flute, as well as being lower. That being said, there are few things that might need to be considered:

You should look at the lowest note actually played in the 'cello part to figure out your transposition (by assigning that note to low C on the flute): not all 'cello parts use the open C string. Even then, you may need to adjust the transposition level for ease of fingering.
Certain figurations are going to idiomatic to the 'cello, but possibly much less so to the flute. For instance, arpeggios across the strings: some of these might span a range that is awkward across the breaks. You might need to modify the figuration into something more idiomatic for the flute.
Similarly, certain effects native to the 'cello might need to be given flute equivalents, for instance sul ponticello or harmonics, perhaps replacing these with flutter-tonguing and "white tone" (senza vibrato) respectively. You may need to figure out how to deal with 'cello chords. (Perhaps by gracing up to the top note? Changing accompanying parts? Is there a suitable multiphonic, and is that feasible for the intended performers?)
If it is an accompanied piece, you may well have to adjust the accompaniment, even if you remain in the same key as the original. The ambitus of the 'cello means that it will normally be accompanied as a tenor instrument (which is fairly easily hoisted to the flute's range, although you may need to fix parallel fifths if the idiom precludes them), but it's a rare composer who will resist contrasting that texture with one using the 'cello as a bass, and that is not something your flute part can manage. This also means that the chord inversion may change at times, and that can sometimes break the harmony.
Finally, as @guidot also mentions in his comment, because of the 'cello's wider range, you may have to change the (relative) register of certain passages.

Whether you need to arrange the music to this extent is going to depend on the complexity and range of the 'cello part, and on its relationship to the accompaniment, but do bear in mind that it is quite possible (the instruments being so different in type) that you will find it wiser to give an impression of the piece rather than a straight transposition; for music of even modest complexity, it even becomes quite likely.
Answer: It will depend on the range of the piece in question, but a simple way would be to take the highest line away from the bass clef and put an extra one at the bottom. Either mentally of by re-writing. This would put every note into a treble clef situation, and be simple to do. And hopefully simple to read. The only problem then, is, as I say, the range may not be good for you or the flute.
Or - you could leave the dots where they are, and pretend that the bass clef is actually treble, but then you'd be playing in a different key,and have to compensate by changing the key signature to a key a minor third higher. Which again, may take you out of range. Otherwise, as Dom states, transpose completely. It depends also whether you want to keep it in the same key as original, which should be a possibility.

Music theory - transposing


Car rental in foreign country question

Question: I am renting a car for a trip to England. The car rental agency offers insurance for damage to their car. My personal auto insurance company doesn't cover me in England and doesn't offer any international policies. So what happens if there was an accident and damage was done to someone else's car? How is that covered? How do I get protection for damage done to their car?
thank you!!
Comment: What country are you renting the car in? Does the rental agreement include any insurances?
Comment: Typically, you *don't* buy insurance to protect other people's property. Those people are responsible for having insurance to cover potential damage or loss. What you carry is *liability* insurance, which covers damage or destruction for which you are deemed liable, when they or their insurance company come demanding compensation. How this is administered varies greatly by locale, however.
Answer: As the other answer implies, in the UK it's obligatory to drive in the UK with third party insurance. For a rental car, that isn't very helpful as the rental car company could be fully insured themselves, but still require you to pay an arbitrary deductible amount should an accident occur.
Typically, renting a car in the UK without fully comprehensive insurance means that you could be liable to an excess amount of anything up to GBP 2000 or so depending on the rental car company. To reduce it you could pay the rental car company up to GBP 30/day for insurance, rent via a third party company that has negotiated a lower excess, or you could purchase a third party rental car excess insurance policy. I have one that covers me for any number of rentals per year and costs less than GBP 100 per year. I have had occasion to use it with a stolen car that would have cost me GBP1000+ so it has worked out for me. I do rent for 3 or 4 months per year though.
Answer: UK rentals should include 3rd party liability and damage to the car (typically with a relatively large deductible called 'excess').
Avis UK gives a list of standard and optional insurance types here. See the 2nd item under "Basic cover at no extra cost".

Not related to your question directly, but there have been a number of complaints of lack of transparency in top-up collision insurance cost, and fairly unreasonable and un-negotiable charges for minor damage such as scratches. Covering the 'excess' which could amount to as much as GBP 1000 with optional insurance purchased through the company can cost a lot of money (and the cost is reportedly sometimes not disclosed until you are at the counter). You may have coverage through a premium credit card (or not).
Comment: To make sure I understand clearly- so in the UK all rental cars-no matter what the company is- automatically comes with liability insurance for damage to others cars?
Comment: From what I can see of UK rental agreements it is typically included in the price **with a large deductible**. True of Budget, Avis, Sixt. . There are 3rd parties who will insure the excess or the car company can do it (for more money typically). Or provide additional 3rd party coverage. [This site](https://www.ricksteves.com/travel-tips/transportation/car-rental-cdw) says European rates "almost always" include "basic mandated liability coverage". I believe that the European mandated liability amount is much more likely to be adequate than it might be in the US.

Car rental in foreign country question


create my own jquery form from sharepoint designer 2010

Question: How can I create my own custom jQuery form from within SharePoint Designer 2010, with my own validation tactics for the form, and my own post data processing with Ajax?  Any good tuturials out there?
Answer: Ok I got it. It's not the most elegant, but doable. Through SharePoint Designer, create your custom HTML form on an .HTML page. If it involves javaScript or a posting data to another URL, place the appropriate code on the same page. Save it. Then on your publishing .aspx page which will have a web part, load a Page Viewer to call the custom HTML form you just created. If you need additional JavaScript to modify the form after the DOM is ready, jQuery is excellent for the job.
Comment: Please mark this as the accepted answer, as it may help other users with the same problem. Thank you!


Black bar covering bottom half of images, with or without flash

Question: I use a Nikon D610 and whenever I take a picture, I get a black bar at the bottom covering half of the photo. How do I fix this? Is my shutter speed off? It isn't very fast, but no matter what I do I can't figure out a way to fix it. The camera is 3 months old even without flash I get the black bar in my photos.
Answer: Your shutter may be going bad. Needs to go back to the factory.
Does this happen when you use flash? If so, that would simply be a sync problem. Use a slower shutter speed.
Comment: the camera is 3 months old and no even without flash i get it
Comment: @user29557 Call customer service at Nikon and they'll have you send it back under warranty. Try going to the Nikon website and find out what the procedure is. I'm a Canon guy so I can't advise specifics, but I'm sure Nikon has a similar highly organized system for handling warranty repairs. It does sound like a defect.
Answer: The D610's maximum sync speed is 1/200s.  If you have set your shutter speed higher than this, and you are not using Auto-FP (high-speed sync) or you're using a flash that cannot do high-speed sync, you get dark bars at the top and/or bottom of the frame.
Essentially, the shutter speed on a camera is controlled by the gap between the 1st and 2nd curtains.  The larger the gap, the longer the shutter speed.  As your shutter speed increases, this gap gets smaller, and at your maximum sync speed, is just large enough that your entire sensor is uncovered when the exposure is made.
Any faster, and the gap becomes smaller than your sensor, and since the flash burst is much faster than your shutter speed, parts of your sensor are covered by the curtains during the flash burst.
FP (focal plane) or high-speed sync mode requires that the camera and flash communicate with each other timing-wise, so that the flash can pulse light in sync with the gap sweeping across the sensor for the duration of the exposure, thereby getting the flash's illumination to the entire frame.  But this will reduce the light from the flash a great deal (about two stops), and does require a flash and camera body combination that can perform HSS. E.g., a D3100 or a Yongnuo YN-560 cannot do HSS.
See also: Neil van Niekerk's tutorial on High-Speed Sync.

Edit: Didn't see that this is happening even without flash--in that case, you probably have a faulty shutter and need to get the camera serviced.
Comment: Didn't see that this is happening even without flash--in that case, you probably have a faulty shutter and need to get the camera serviced.
Comment: so how do i fix it
Comment: If you're using the pop-up flash, you can't--the pop up won't do FP/HSS. You need an HSS-compatible speedlight (e.g., SB-700, SB-910) on the hotshoe to use FP/HSS. You set FP/HSS by going into the custom functions and setting e1 to 1/200 Auto FP.
Answer: Check to see if you accidentally set your camera to bracket photos.  This happened to me last night.
Comment: how would bracketing put a black bar at the bottom?