text:
import { Delayer } from 'vs/base/common/async';
import { Emitter, Event } from 'vs/base/common/event';
import { Schemas } from 'vs/base/common/network';
import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc';
import { IMenuService } from 'vs/platform/actions/common/actions';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { IFileService } from 'vs/platform/files/common/files';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IMainProcessService } from 'vs/platform/ipc/electron-sandbox/services';
import { ILogService } from 'vs/platform/log/common/log';
import { INativeHostService } from 'vs/platform/native/electron-sandbox/native';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
import { ITunnelService } from 'vs/platform/remote/common/tunnel';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { FindInFrameOptions, IWebviewManagerService } from 'vs/platform/webview/common/webviewManagerService';
import { WebviewThemeDataProvider } from 'vs/workbench/contrib/webview/browser/themeing';
import { WebviewContentOptions, WebviewExtensionDescription, WebviewOptions } from 'vs/workbench/contrib/webview/browser/webview';
import { IFrameWebview, WebviewMessageChannels } from 'vs/workbench/contrib/webview/browser/webviewElement';
import { WebviewFindDelegate, WebviewFindWidget } from 'vs/workbench/contrib/webview/browser/webviewFindWidget';
import { WindowIgnoreMenuShortcutsManager } from 'vs/workbench/contrib/webview/electron-sandbox/windowIgnoreMenuShortcutsManager';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';

/**
 * Webview backed by an iframe but that uses Electron APIs to power the webview.
 */
export class ElectronIframeWebview extends IFrameWebview implements WebviewFindDelegate {

	private readonly _webviewKeyboardHandler: WindowIgnoreMenuShortcutsManager;

	private _webviewFindWidget: WebviewFindWidget | undefined;
	private _findStarted: boolean = false;
	private _cachedHtmlContent: string | undefined;

	private readonly _webviewMainService: IWebviewManagerService;
	private readonly _iframeDelayer = this._register(new Delayer<void>(200));

	public readonly checkImeCompletionState = true;

	protected override get platform() { return 'electron'; }

	constructor(
		id: string,
		options: WebviewOptions,
		contentOptions: WebviewContentOptions,
		extension: WebviewExtensionDescription | undefined,
		webviewThemeDataProvider: WebviewThemeDataProvider,
		@IContextMenuService contextMenuService: IContextMenuService,
		@ITunnelService tunnelService: ITunnelService,
		@IFileService fileService: IFileService,
		@ITelemetryService telemetryService: ITelemetryService,
		@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
		@IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService,
		@IMenuService menuService: IMenuService,
		@ILogService logService: ILogService,
		@IConfigurationService configurationService: IConfigurationService,
		@IMainProcessService mainProcessService: IMainProcessService,
		@INotificationService notificationService: INotificationService,
		@INativeHostService private readonly nativeHostService: INativeHostService,
		@IInstantiationService instantiationService: IInstantiationService
	) {
		super(id, options, contentOptions, extension, webviewThemeDataProvider,
			configurationService, contextMenuService, menuService, notificationService, environmentService,
			fileService, logService, remoteAuthorityResolverService, telemetryService, tunnelService);

		this._webviewKeyboardHandler = new WindowIgnoreMenuShortcutsManager(configurationService, mainProcessService, nativeHostService);

		this._webviewMainService = ProxyChannel.toService<IWebviewManagerService>(mainProcessService.getChannel('webview'));

		this._register(this.on(WebviewMessageChannels.didFocus, () => {
			this._webviewKeyboardHandler.didFocus();
		}));

		this._register(this.on(WebviewMessageChannels.didBlur, () => {
			this._webviewKeyboardHandler.didBlur();
		}));

		if (options.enableFindWidget) {
			this._webviewFindWidget = this._register(instantiationService.createInstance(WebviewFindWidget, this));

			this._register(this.onDidHtmlChange((newContent) => {
				if (this._findStarted && this._cachedHtmlContent !== newContent) {
					this.stopFind(false);
					this._cachedHtmlContent = newContent;
				}
			}));

			this._register(this._webviewMainService.onFoundInFrame((result) => {
				this._hasFindResult.fire(result.matches > 0);
			}));

			this.styledFindWidget();
		}
	}

	public override mountTo(parent: HTMLElement) {
		if (!this.element) {
			return;
		}

		if (this._webviewFindWidget) {
			parent.appendChild(this._webviewFindWidget.getDomNode()!);
		}
		parent.appendChild(this.element);
	}

	protected override get webviewContentEndpoint(): string {
		return `${Schemas.vscodeWebview}://${this.id}`;
	}

	protected override style(): void {
		super.style();
		this.styledFindWidget();
	}

	private styledFindWidget() {
		this._webviewFindWidget?.updateTheme(this.webviewThemeDataProvider.getTheme());
	}

	private readonly _hasFindResult = this._register(new Emitter<boolean>());
	public readonly hasFindResult: Event<boolean> = this._hasFindResult.event;

	private readonly _onDidStopFind = this._register(new Emitter<void>());
	public readonly onDidStopFind: Event<void> = this._onDidStopFind.event;

	public startFind(value: string) {
		if (!value || !this.element) {
			return;
		}

		// FindNext must be true for a first request
		const options: FindInFrameOptions = {
			forward: true,
			findNext: true,
			matchCase: false
		};

		this._iframeDelayer.trigger(() => {
			this._findStarted = true;
			this._webviewMainService.findInFrame({ windowId: this.nativeHostService.windowId }, this.id, value, options);
		});
	}

	/**
	 * Webviews expose a stateful find API.
	 * Successive calls to find will move forward or backward through onFindResults
	 * depending on the supplied options.
	 *
	 * @param value The string to search for. Empty strings are ignored.
	 */
	public find(value: string, previous: boolean): void {
		if (!this.element) {
			return;
		}

		if (!this._findStarted) {
			this.startFind(value);
		} else {
			// continuing the find, so set findNext to false
			const options: FindInFrameOptions = { forward: !previous, findNext: false, matchCase: false };
			this._webviewMainService.findInFrame({ windowId: this.nativeHostService.windowId }, this.id, value, options);
		}
	}

	public stopFind(keepSelection?: boolean): void {
		if (!this.element) {
			return;
		}
		this._iframeDelayer.cancel();
		this._findStarted = false;
		this._webviewMainService.stopFindInFrame({ windowId: this.nativeHostService.windowId }, this.id, {
			keepSelection
		});
		this._onDidStopFind.fire();
	}

	public override showFind() {
		this._webviewFindWidget?.reveal();
	}

	public override hideFind() {
		this._webviewFindWidget?.hide();
	}

	public override runFindAction(previous: boolean) {
		this._webviewFindWidget?.find(previous);
	}
}


My effort in creating websites focusing at Singapore related services and products started to generate more Adsense revenue. I have intentionally optimized for Singapore related keywords, that's what I called Singapore SEO'ed websites.
It was a year ago when I registered the domain SingaporeBusiness.info and started the website.
However, I did not implement Google ads until this month. One of the reasons was that the low traffic. The traffic started to exceed 3,000 pageviews 2 months ago.
Early this month, I revamped the layout and also the structure of the website and saw a 30% jump in traffic compare with same period last month. Also over the last 10 days since I added Google codes, the average CTR exceeds 6%. This is good news but the PPC is quite low, less than $0.05 per click.
The other website which I revamped was originally a one-page website providing information in buying, selling and exporting Singapore used cars. Since it was first launched, it had been one of my more popular website (based on visitors per content page).
In less than six months, Singapore-Used-Cars.com has already exceed the 3,000 pageviews. I have added 6 more content pages and hope to increase the number of visitors by at least 30%. And I intend to add a least one new content page every week from now on.


text:
Kazuhiro Sase, MD, PhD
Kazuhiro Sase, MD, PhD is a Professor of Clinical Pharmacology and Regulatory Science at the Juntendo University in Tokyo, Japan. He has been trained as an interventional cardiologist at Kyoto University, and as a post-doctoral research fellow of Molecular Cardiology, Brigham and Women's Hospital, Harvard Medical School in Boston, before he served as a Chief Medical Reviewer of the Pharmaceuticals and Medical Devices Evaluation Center of Ministry of Health, Labour, and Welfare in 1999, what has evolved into the Pharmaceuticals and Medical Devices Agency. In 2001, Dr. Sase was appointed Director of the Clinical Research Center, National Cardiovascular Center Hospital in Osaka. In 2005, he was appointed to his current position. He has been involved in numerous activities to support research infrastructures, including Japanese Medical Association, Center for Clinical Trials, Center for Research and Development Strategy, Japan Science and Technology Agency, Pharmaceutical Society of Japan, Health Research Initiatives, Cabinet Office, Ministry of Economy, Trade, and Industry, and Japanese Registry for Mechanically Assisted Circulatory Support. He has also been active in many international initiatives for global harmonization and regulatory convergence, including US-Japan Harmonization by Doing, Global Harmonization Task Force, Medical Device Epidemiology Network, and International Medical Devices Regulators Forum.

redpajama_set_name: RedPajamaCommonCrawl


From the very first moments of ON YOUR FEET! The Emilio and Gloria Estefan Broadway Musical, as it opens with a stripped down version of Miami Sound Machine's "Rhythm Is Gonna Get You," you get the feeling that the audience is about to be blasted out of their seats! And this musical IS a blast: Colorful, loud, vibrant and PASSIONATE! But it is also very touching.
This post is sponsored. We received press tickets to the opening night of this show.
Growing up in Florida, Miami Sound Machine was the soundtrack of my childhood. And then, just as I was getting into radio in 1990 and playing Gloria Estefan's solo music, she was in a terrible bus accident and broke her back. This is covered in ON YOUR FEET, but there is so much more; we learn what teenage Gloria originally wanted to do for a career, and how her mother almost came to Hollywood as a girl, and that Gloria took care of her dad, who had multiple sclerosis. We also get to witness a very memorable entrance from Emilio (Mauricio Martinez), who strolls in in some of the tiniest shorts every to hit a theatre stage. How could Gloria not fall in love?
And speaking of Gloria, actress Christie Prades has somehow managed to speak and sing EXACTLY like the real Gloria! She is so fantastic, dancing and singing without even sounding winded (although I do think they slowed "Conga" down a hair to make this possible for everyone!) Christie and Mauricio are the heart and soul of ON YOUR FEET, and their chemistry and playful relationship are a big reason why this show works as well as it does.
Another reason is the MUSIC! "Coming Out Of The Dark," "Get On Your Feet," "Here We Are," "Live For Loving You"…listening to these songs and so many more you are reminded why Gloria is the most successful Latin crossover performer in the HISTORY of pop music and has sold more than 100 million albums. And Emilio has 19 Grammy Awards, is a music, television, and film producers, and developed not only his wife's career but also the careers of Jennifer Lopez, Marc Anthony, Shakira and more. They are a wonderful success story but also seem to still truly love each other.
I have to give a special shout out to the on stage orchestra (that percussion section!!!), along with Clay Ostwald for music direction, Alexander Dinelaris for writing the book, Sergio Trujillo for that insane choreography, and Jerry Mitchell for his direction. I would say that if your child is at least 8 years old and can sit for about 2.5 hours (there is a brief intermission between acts), it is fine to bring them. My son is 8, and I'm planning to take him to see ON YOUR FEET when it moves to the Segerstrom Center for the Arts in Costa Mesa in August.
ON YOUR FEET! The Emilio and Gloria Estefan Broadway Musical is playing at the Hollywood Pantages through July 29th.
Tickets are available at www.HollywoodPantages.com/OnYourFeet and www.Ticketmaster.com, by phone at 1-800-982-2787 or in person at the Hollywood Pantages Theatre Box Office (Opens Daily at 10 am.).


Limited edition dahlia flower photography metal art print "Romance I" is an image of a dewy purple dahlia bud. It is part of a series of photos of dahlia buds entitled "Romance." Each image in the series has a dreamy quality.
This dahlia flower photography image is 16x20 in size and will be professionally printed on aluminum with a mid-gloss finish, with a float mount hanger on the back.
This dahlia flower print is SPECIAL ORDER ONLY. It will be drop shipped by my professional lab at no addtional charge to the purchaser. A signed certificate of authenticity including the edition number (3 of only 13) will be mailed separately to the purchaser. The image will be digitally signed by the artist.


Who makes the city? asks Creative Director Matthias Böttger in 2015. How can social objectives and formal synthesis, robust responsibility and fragile creativity be combined? How can speculative practice change architecture? Architecture´s task is not only to provide solutions, but to name and describe new challenges. Architecture provides no definitive answers, but remains open for questions – you are cordially invited to share and discuss!


Telecommunications (telecom) for the modern grid is developing into a complex, multi-tiered network-of-networks that can manage and integrate diverse technologies and facilitate the rapid, seamless flow of information.
At the top of the grid telecommunications hierarchy are wide area networks (WAN). These are the most comprehensive networks and can extend beyond the utility's service territory. As the telecom backbone, they support smaller field area networks (FAN), which in turn support neighborhood area networks (NAN) and even home area networks (HAN). Each network can employ multiple technologies.
Telecommunications can potentially enable greater levels of distributed generation, distribution automation, substation automation, and alternative telecom business models, but technical and operational challenges remain.
Wide area networks. Operational excellence and strategic vision for the WAN. Critical areas include the transition from legacy systems to packet-based networks, the convergence of IT and OT Networks, and new approaches for strategic fiber deployment.
Field area networks. Evaluating and selecting optimal FAN solutions. Critical areas include evaluating various wireless technologies in both private and public spectrums and analyzing usage trends in the unlicensed wireless spectrum.
Network management and planning. Critical areas include automation, metrics, and cyber security.
According to Godfrey, the most common technology used for WANs today is fiber-optic cable.
Fiber material is cheap. While the cable is expensive to install (either overhead or underground), it typically lasts more than 30 years. It is often deployed atop transmission lines in optical protective ground wire.
"Fiber is the gold standard for telecom," said Godfrey. "Every strand is as fine as your hair, strong as steel, and supports multiple gigabits per second. It's fast-lane, reliable, and durable. In areas of devastation I've seen the fiber cable holding up the pole." In 2017, EPRI published two reports (see Strategic Fiber Handbook Phase 1 and Phase 2) that evaluate ways to improve deployment and operation of fiber.
One of EPRI's goals for 2018 is to research the potential benefits and challenges involved in expanded use of fiber in a 5G world.
EPRI is building on its Field Area Network Demonstration, which focused on wireless connectivity from substation to the distribution grid. "We developed a platform that utilities could use to test long-term reliability and performance of various wireless systems," said Godfrey.
A mix of wireless technologies is necessary for various applications.
The private licensed spectrum is the optimal choice for many applications, but cost is high and availability limited.
New opportunities are emerging with commercial cellular technology, including Mobile Virtual Network Operators (MVNO), Private Virtual Network Operators (PVNO), and private LTE networks.


text:
Why aren't Purim and Channuka considered a violation of לֹא תֹסִפוּ?
It says in Devarim 4:2:
לֹא תֹסִפוּ עַל הַדָּבָר אֲשֶׁר אָנֹכִי מְצַוֶּה אֶתְכֶם וְלֹא תִגְרְעוּ מִמֶּנּוּ לִשְׁמֹר אֶת מִצְוֹת יְ־הֹוָ־ה אֱלֹהֵיכֶם אֲשֶׁר אָנֹכִי מְצַוֶּה אֶתְכֶם
Do not add to the word which I command you, nor diminish from it, to observe the commandments of the Lord your God which I command you.
Now I understand that the rabbis have the ability to make halachot that are either guards on another halacha (e.g. the concept of muktza) or interpretations of a halacha in torah (e.g. not using electricity on shabbat, being that there was obviously no such thing as electricity when the torah was given). However Chanukah and Purim are not guards on mitzvot, nor are they interpretations of what a mitzva means. They are entirely new mitzvot! So why don't Purim and Chanukah fall into the category of לֹא תֹסִפוּ?
At this point, I am usually given the answer: "Purim and Chanukah are mitzvot derrabannun (from the rabbis) and since they don't claim that it is a mitzva deorita (a mitzva directly from torah) they were allowed to establish it".
Now the problem I have with the above statement is as follows:
There is a Gemara in Brachot (27b) that says (and I'm paraphrasing) that a person who quotes his rabbi on something that he never said is causing the Shechinah to depart from the Jewish people.
Now I quote the actual bracha that is said on Chanukah and Purim.
ברוך אתה ה' א‑לוהינו מלך העולם, אשר קדשנו במצותיו וצונו להדליק נר של חנוכה.
"Blessed are You, Lord, our G-d, King of the universe, Who has sanctified us with His commandments and commanded us to kindle the Hanukkah lights.
The same is true for Purim:
ברוך אתה ה' א‑לוהינו מלך העולם, אשר קדשנו במצותיו וצונו על מקרא מגלה.
"Blessed are You, Lord, our G-d, King of the universe, Who has sanctified us with His commandments and commanded us to read the Megillah.
Now according to the bracha, it is saying that G-d himself commanded us to light the Chanukah candles, which is in fact not true, as the torah was given far before the story of Chanukah.
Around this time, I usually get the answer: "It says in the torah that you have to listen to the rabbis, therefor, since the torah says listen to the rabbis, and the rabbis say light candles on Chanukah, then the torah is saying light candles on Chanukah".
Now I have a huge problem with this, because they could have very easily worded the bracha such that it said "Blessed are You, Lord, our G-d, King of the universe, Who has sanctified us with His commandments and commanded us to follow the ways of the rabbis, who have told us to kindle the Hanukkah lights."
Now I go back to the Gemara that I quoted earlier. If it considered such a horrible thing to misquote your rabbi, than Kal Vachomer wouldn't it be even worse to misquote G-d himself???
Since most of the people here probably originated on Stack Overflow, I though I would try giving an analogy to programming. Let's say I take a programming class with teacher-X. Teacher-X learned how to program directly from Mark Zuckerberg himself. On the first day of class, Mark Zuckerberg comes in, and tells us that he had personally taught Teacher-X himself, and he really knows what he is talking about, so we should listen to everything he says. Teacher-X teaches me to program using a specific style which I go on to use when I code. One day, I am writing a program with my friend, and he notices the strange style I am coding with, so he asks why I am doing it that way. I tell him, Mark Zuckerberg taught me to do it. Well, in fact, Mark Zuckerberg did not teach me to do it that way, and saying that he did was is a false statement. I learned it from Teacher-X, Zuckerberg just told me to listen to him because he had trained him. Similarly, when saying the bracha on Chanukah candles, saying that G-d himself commanded me to light the Chanukah candles is a false statement. He simply told me to listen to someone who did. And I am now quoting G-d with something he never said. And while it may not in practice be as horrible as what is said in the Gemara, I would imagine it is still not a good thing to do.
So how were the Rabbanim able to create Channukah and Purim in the way they did? I don't want to start accusing the Rabbanim of directly violating the laws of the torah, however I'm having a hard time understanding how they could create these holidays in the way they did without doing so. So what did allow them to do it like this?
blessing halacha-theory chanuka purim bal-tosif-no-adding
If you're referring to Berachos 27b, it doesn't say anything about kares, just that such a person "causes the Shechinah to depart from the Jewish people." – Alex Apr 2 '12 at 23:17
Oh, I had assumed that was referring to karres. I'll update my question. Thanks! – Ephraim Apr 2 '12 at 23:19
Ephraim, you have an excellent question, but you are clouding the point with extraneous issues. Your question should go something like this: The pasuk lo sosifu forbids us from adding mitzvos to the Torah. An exception to this rule is the ability of sages to implement safeguards to the Torah (source+examples). How were the sages allowed to institute the mitzvos of purim and chanukah since these are not safeguards? – YDK Apr 2 '12 at 23:37
Very related: Halachic Restrictions not in the Torah, and "shall not add" – HodofHod Apr 3 '12 at 23:29
Seriously? Zuckerberg is your best example of authority on programming? Facebook's success had nothing to do with the quality (or lack thereof) of his code. – AviD Dec 6 '12 at 23:46
The mitzvos of Purim and Chanuka definitely fit the bill for the violation of lo sosifu according to the Ramban (vaeschanan 4:2). More specifically, the Yerushalmi quotes a different pasuk- These are the mitzvos that Hashem commanded Moshe. Lo sosifu refers to adding in general, but the former pasuk forbids adding even through prophecy.
Both the Bavli (Megila 14a) and the Yerushalmi (Megila 6b) take issue with Purim. The Bavli allows Purim based on a kal v'chomer drash from the Torah: If we establish a day of praise for Hashem freeing us from bondage, certainly we can do so for His saving our lives. The Ritva applies the same logic to Chanuka. The Yerushalmi says that they only allowed the writting of the megilla after finding "hints" in the Torah (ie, megilla was built into the Torah in advance).
I would guess that once the Holiday had a leg to stand on, any mitzvos that are ancillary to the holiday would be permitted as well.
As far as the Brachos, I'm not bothered by that question. Throughout the talmud, the sages try to keep things uniform so that the masses would not get confused. For example: Lo palug, nasata devarecha l'shiurim, and generally many decrees were based on avoiding confusion. As long as the sages are not instituting a text that is false (see Alex and Drew's answer), best practice is to keep the same format as other blessings and not confuse the masses by trying to be "more truthful".
YDKYDK
Eleh HaMitzvot is just there because without that, we would have thought that lo sosifu through a navi would be ok. Chanuka is not an issue, since nobody was claiming that is was from God. All this is in the Ramban you quoted. – blockhead Jun 8 '15 at 6:07
That statement about quoting something not from one's teacher is taken by Rambam (Hil. Talmud Torah 5:9) to mean that by failing to quote the author, one implies that his teacher made this statement (since it can be generally assumed that whatever a student says comes from his teacher). In other words, the problem isn't saying "Rabbi X said Y" when he never said that, but simply saying "Y" in such a way that people will assume that Rabbi X said it. That is different than stating something that indeed can be inferred from what Rabbi X said, something which is common throughout the Talmud (as in the common expression לאו בפירוש אתמר אלא מכללא - Berachos 9a and in over a dozen other places). While it is true that R. Eliezer (the author of the statement to which you're referring) was particularly careful about that - "he never said anything that he hadn't heard from his teachers" (Sukkah 27b, et al), we see that this is not the general practice.
By the same token, then, it is indeed perfectly in order to attribute an order to the controlling authority rather than to his subordinates. (It is the same way as, lehavdil, we might state that such-and-such is "President so-and-so's policy" even though in fact it may originate from the deputy assistant secretary of such-and-such agency - because ultimately that person answers to, and derives his or her legal authority from, that of the president.) So since Hashem is the one who gives the sages the authority to legislate such mitzvos, it is correct to state that He (indirectly) commanded them.
Rambam (Hil. Berachos 11:3) puts it as follows (translation from here):
Where has He commanded us [to fulfill these commandments]? In the Torah, which states [Deuteronomy 17:11]: "Act [according to the judgment] they relate to you." [Based on this Biblical verse, the blessing recited before fulfilling a Rabbinical commandment] can be interpreted as follows: Who has sanctified us with Your commandments and commanded us to listen to these [sages] who have commanded us to light Chanukah candles or read the megillah. The same applies regarding all Rabbinic commandments.
(The verse that Rambam quotes is one of the ones mentioned in Shabbos 23a, as in Drew's answer.)
AlexAlex
Let me give an analogy to programming. Let's say I take a programming class with teacher-X. Teacher-X learned directly from Mark Zuckerberg. On the first day of class, Mark Zuckerberg comes in, and tells us that He tought Teacher-X himself, and he really knows what he is talking about, so we should listen to everything he says. Teacher-X teaches me to program using a specific style. My friend sees how I am coding and asks why I am doing it that way. I tell him, Mark Zuckerberg taught me to do it. That however is a false statement, I learned it from Teacher-X, Zuckerberg just told me to listen. – Ephraim Apr 2 '12 at 23:49
Similarly to the bracha, saying that G-d himself commanded me to light the channuka candles is a false statement. He simply told me to listen to someone who did. And I am quoting G-d with something he never said. And while it may not in practice be as horrible as what is said in the gemara, I would imagine it is still not a good thing to do. – Ephraim Apr 2 '12 at 23:53
The difference is that in your example, Zuckerberg and Teacher-X are both human beings, and the latter has his own notions that aren't necessarily encapsulated in what he learned (although they can be said to be derived from it). By contrast, "Scripture, Mishnah, Talmud and Aggadah - even what a diligent student will in the future explain in his teacher's presence - all was said to Moshe at Sinai" (Yerushalmi, Pe'ah 2:4). Elsewhere (Megillah 1:5, a few lines after what YDK mentioned in his comment on the question) it in fact states that the Megillah as we have it was given to Moshe at Sinai. – Alex Apr 2 '12 at 23:59
@Ephraim: the Avos, it says, kept the whole Torah before it was given. To the best of my knowledge, though, nowhere does it say such a thing about the Jewish people collectively. So yes, perhaps indeed Avraham, etc., celebrated Chanukah and Purim in some form (see judaism.stackexchange.com/questions/4078/avot-keeping-mitzvot), but that doesn't have to mean that anyone did so after the giving of the Torah. – Alex Apr 3 '12 at 3:25
@Ephraim: that something was given at Sinai doesn't mean that it was known to the people yet, though. Indeed, see Menachos 29b, the famous story about Moshe Rabbeinu observing R. Akiva teaching "mounds and mounds of halachos derived from the crowns on the letters," where Moshe himself didn't know the information that R. Akiva was teaching! But as R. Akiva concluded, it's all halachah le-Moshe mi-Sinai - it's all indeed encapsulated in what Hashem told Moshe, just that in some cases it's up to later generations to make these deductions explicit. – Alex Apr 3 '12 at 15:04
Rambam answers in his introduction to Mishneh Torah that Bal Tosif isnt violated since megilah doesnt purport to be Biblical, but rather is clearly rabbinic.
"He is not saying that the Holy One, blessed be He, commanded us to make an eruv or read the Megillah at its [appointed] time. Were he to say so, he would be adding to the Torah. Instead, we are saying that the prophets and the courts ordained...." (trans. Moznaim)
הרי לא אמרו שהקדוש ברוך הוא ציוה לעשות עירוב או לקרות המגילה בעונתה. ואילו אמרו כן, היו מוסיפין על התורה. אלא כך אנו אומרין: שהנביאים עם בית דין תיקנו וציוו לקרות המגילה
See this article for further reading.
mevaqesh
See Shabbat 23a where Rav Avia and Rav Nehemiah each pose their own answer, both using proof-texts from the book of Deuteronomy.
Shmuel Brin
Drew KaplanDrew Kaplan
This doesn't answer the main question of how chazal were able to institute the mitzvos in the first place. – YDK Apr 2 '12 at 23:38
@YDK I'm not sure that's actually the main question. – Double AA♦ Apr 2 '12 at 23:40
@DoubleAA, To me, it seems his main problem is lo sosifu. He then goes into a long v'chi teima and ends at his original question (but perhaps allowing for the v'chi teima if someone can fix that up). To me, the v'chi teima isn't really an answer in the first place. – YDK Apr 2 '12 at 23:44
Drew, welcome to Judaism.SE, and thanks very much for this answer! To improve your answer, please consider quoting and/or summarizing that particular Gemara here. Also, please consider registering your account, which will give you access to more of the site's features. I hope to see you around! – HodofHod Apr 3 '12 at 1:59
Not the answer you're looking for? Browse other questions tagged blessing halacha-theory chanuka purim bal-tosif-no-adding .
Avot keeping Mitzvot
Halachic Restrictions not in the Torah, and "shall not add"
Who Commanded Us, and For What?
Doesn't gezera affect the Torah?
Channukah and Bal Tosif
Source for a Maharal I learned a while back…help
How are the feasts of Purim and Hanukkah justified in light of Devarim 4:2 and 13:1?
Formulation of blessing on individual tithes
Amen to another's blessing while you are in the middle of a verse containing a curse
Can one say the "lights of fire" bracha before they light the Havdalah candle?
Why no addition to me'ein shalosh for Purim (and Chanukka)?
Where are we commanded to light candles Fri night?
Why is "Pirsumei Nissa" (publicizing the miracle of Chanukah) so important?
Where are we commanded to wrap ourselves in Tzitzit?
Lighting the first Chanukah candle after the first Brachah
Why do we recite "v'tzivanu" in mitzvos which come from the Rabbis?
Kedushas Levi's Eight Segulos of Chanukah


Quick & Easy Tiramisu - Pretty. Simple. Sweet.
With the filling being eggless and alcohol-free, this is a quick version of tiramisu – a dessert made of layers of coffee-soaked ladyfingers and a rich, airy mascarpone cream.
It took a long time before I made a "real" tiramisu. Instead, I kept coming back to today's recipe, and not just because it was easier. In a classic tiramisu recipe, Marsala, a slightly sweet red wine, is added (although there are substitutions). While there are several valid reasons to omit alcohol, I simply didn't feel like buying a whole bottle for just a few drops. Then one day about two years ago, Erez showed up after work, holding a bottle of Marsala.
Apparently, this wine is also a perfect addition to tomato sauce, which is why Erez bought it. A few days before, we had tasted an amazing tomato sauce at a restaurant, and he wanted to try recreating it for us. He's a superb cook, and I'm a lucky girl.
At first, I wasn't sure why the name Marsala sounded familiar, but it kept resonating in my head. It took me 3 days to realize it's the one ingredient I was always missing for tiramisu. A lot of tiramisus have been made in my kitchen since then.
Although I love a traditional tiramisu, this quicker version isn't less delicious, and I find reasons to make it all the time. With the filling being egg-free, the dessert is much quicker to put together.
The mascarpone, folded with the cream, makes a thick yet airy mixture. I couldn't stop eating spoonfuls of it! Mascarpone is always SO good! If you want a richer filling, you can add more mascarpone (up to ½-1 cup); if you want a lighter filling, you can add more whipping cream, (up to ½-1 cup). In the last case, know that the dessert will be harder to manage if made in a dish instead of glasses because the cream will make it extra airy.
The alcohol in the recipe is optional, but definitely add it if you can.
I prefer serving this particular tiramisu in individual glasses or trifles because, due to the lack of eggs in the filling, the cream sets less than in a traditional tiramisu. Besides, it looks fancier served this way. If you choose to make it in a baking dish, make sure you give it a few hours (at least 8) to set completely.
For more detailed information on how to assemble the recipe, or if you're looking for a more traditional tiramisu, please refer to my other tiramisu post.
For coffee syrup: In a small bowl, combine hot coffee, 2 tablespoons sugar, and 2 tablespoons liqueur. Mix until sugar dissolves. Set aside to cool.
For filling: In a large bowl, whisk mascarpone vigorously by hand until creamy and smooth. Whisk in vanilla extract and alcohol. In a different mixer bowl, whisk together heavy cream and sugar using an electric mixer until stiff peaks form. Fold whipped cream into mascarpone in 2 additions until mixture is smooth.
Assemble tiramisu: Dip ladyfingers very quickly (less than a second) into the coffee syrup and line them in one layer in an 8-inch baking dish (see note for individual glasses). If necessary, break a few ladyfingers to fit them in the dish. Spoon half of the filling over the ladyfingers and smooth the top. Repeat with a second layer of coffee-dipped ladyfingers, then with the rest of the cream. Cover and refrigerate for at least 6 hours or up to 2 days. I don't suggest freezing tiramisu since it will ruin its texture.
Serve cold. Right before serving, dust the top with cocoa powder or grated chocolate (or both!).
For individual glasses: Spoon a dollop of the mascarpone cream mixture into the bottom of the glass. Break each ladyfinger into 4 pieces, soak in the coffee and place on top of the cream. You don't have to use all 4 pieces at once; it depends on the size of the glass. Repeat with layering filling and ladyfingers, creating 2-3 layers in total. For each ladyfinger, add about 2-3 heaping tablespoons of cream. It doesn't have to be exact – if you like more cream, go ahead and add more. For each serving, use 2-3 ladyfingers in total. For individual servings, you might need fewer ladyfingers than what the recipe suggests.
One of my favorite desserts! I just love the creamy mascarpone with the coffee soaked lady fingers…Heaven.
Hi Jane 🙂 While the recipe doesn't call for eggs, when I make it, I do use traditional ladyfingers that are made with eggs. Although I'm not familiar with a specific brand, you can purchase egg-free ladyfingers at a specialty foods store, or you can use eggless sponge cake (cut into pieces) instead. Hope this helps!
The title reads alcohol free but the ingredients include rum or wine.
Hi Saba, the alcohol in the recipe is only optional for anyone who would like to add it since it does add a nice flavor. However, the recipe is amazing without it as well. I always like to include several options for you to choose, and the aim of this recipe is to be quicker and simpler than a classic tiramisu.
Can you get mascarpone any where in Israel and if not whats best substititute..thanks,looks awesome!
Sure! You can find it in any supermarket and in almost any grocery store! Just ask for mascarpone (it's called that way in Hebrew too).
Can i substitute mascarpone with cream cheese and condensed milk whisked together?
Mascarpone is the main ingredient in tiramisu so I wouldn't recommend a substitute (unless you don't care for an authentic tiramisu flavor). The sweet subtle flavor and the creamy texture won't be the same without it.
Can I use a whip cream instead of heavy cream?
Hi Kristal, do you mean whipping cream? If so, then yes you can.
When I beat whipping cream, I can get it to soft peaks only and then it starts breaking down and gets watery. Am I doing something wrong?
Hi Natalie! You probably don't do anything wrong! Making whipped cream can be tricky, as it turns from soft peaks into stiff peaks in seconds, and then breaks down. Whipped cream has a pretty soft texture, even at stiff peaks, so maybe you're looking for the wrong texture. Soft peaks is fine for this recipe, as long as it's not too soft. It should have a consistency of shaving cream. Hope this helps!
I just tried your recipe. It's really easy and simple. Most importantly, it tasted great! Just the right amount of sweetness. I don't have Marsala in my part of the world. I used Tia Maria instead, which is a coffee liqueur. I smiled when I read you didn't want to buy a whole bottle just for a few drops. I don't know about Marsala but Tia Maria keeps well. I've had my bottle for 8 years now. I always taste it before I use it and it's still fine. I don't often make tirimitsu because of the eggs process. It's so much work. Now I should be able to finish my Tia Marie thanks to your lovely recipe!
If i would like to use eggwhites instead of heavy cream…would that be fine? Do i use the same amount or would it differ?
Hi Namirah, check out my other tiramisu post where you can find more details on how to use egg whites instead of whipping cream.
Hi can i use whipped topping instead of heavy cream?
Hi Tyler, whipped topping has different texture and flavor than heavy cream that is whipped, so personally I like it less. If you like its flavor, you can use 2 cups of whipped topping in place of the 1 cup heavy cream that is whipped (because heavy cream doubles its volume when whipped).
Is this for a rectangular 8-inch baking dish or can it be for an 8-inch circular springform pan as well?
It's a square baking dish. A round baking dish is a bit smaller in size, but you can use it if you want.
This recipe looks really simple! Thanks. I attempted tiramisus before, and they always turn out soggy. Do you know what could be causing that and how to prevent it? Thanks!
Hi Naomi, do the cookies get soggy? If that's the case, soak them in the coffee syrup very quickly, it should be less than a second.
Hi Shiran , could you please provide recipe on how to make the lady's fingers at home ?!


text:
Passengers Stuck For Hours On SeaWorld Ride
By Catherine Welch
Dozens of passengers are back on the ground after getting stuck on SeaWorld's Sky Tower ride. It features a double-decker rotating pod that takes guests to the top of the 400 foot ride.
Michel Moffat and his family boarded the slow-moving ride to the top of Sky Tower at around noon Monday.
The ride doesn't have a bathroom, and he thought about going ahead of time, but figured it wouldn't take that long. Well, shortly after the round capsule made it to the top, it stopped suddenly.
"We saw all the people outside watching us and we had no idea what was going on," said Moffat. "So we sat there and sat there and they eventually raised an Orange County fireman up and a maintenance worker to the top."
That maintenance worker released the brake, and three hours later Moffat was back on the ground and shown to the nearest bathroom.
Catherine Welch
See stories by Catherine Welch


text:
Texthelp and Don Johnston Incorporated join forces
to help students across North America and the world achieve more
On behalf of everyone at Texthelp and Don Johnston Inc., we are very happy to announce today that both of our companies are coming together to work as one.
We have worked in parallel in the edtech sector for decades. We both support equality and inclusion of all people, especially individuals with dyslexia and many other learning needs. So our collective plan in joining forces is to make our combined range of products available to as many students as possible.
Today's announcement means Don Johnston Inc. and the product portfolio of Snap&Read™, Co:Writer®, Word Bank™, Quizbot® and uPAR™ are now part of the Texthelp family. All employees of Don Johnston's Education Technology Division will join the Texthelp team.
Don Johnston Inc.'s curriculum division is forming a new company, named Building Wings™ (which will include the products Readtopia® and First Author®).
A shared vision for the future
Our vision and purpose are strongly aligned. We believe that everyone has the right to understand and be understood. We're driven by a vision of a world where every student can feel what it is like to learn and succeed.
"Texthelp and Don Johnston Inc. share a common vision of a world where every student can feel what it is like to learn and succeed." said Martin McKay, CEO and founder of Texthelp. "Don and I founded our organizations for deeply personal reasons. We have an incredibly similar mission to elevate as many students as possible, helping them understand and be understood. We are so excited to have Don Johnston Inc. join the Texthelp Group and to have Don as an investor and board member."
"Our combined teams and expanded range of products will allow us to give millions more students in the US and across the globe the best possible start in life and help them fulfill their full potential. Along with the Don Johnston team, we will continue to innovate and develop our suite of products to create the best assistive technology tools available."
"Don Johnston Inc. and Texthelp have worked in parallel in the edtech sector for decades. We share so many commonalities" said Don Johnston, CEO of Don Johnston Inc. "Fundamentally, we are both unified by a mission to help as many students as possible learn and succeed. I strongly believe that together we can achieve more, and I am excited to see what the future holds. My new role on the board of the Texthelp Group will allow me to continue to drive forward our shared vision."
Champions of choice
We understand that everyone's brains work differently. We want to help each student get the best possible start in life and help them succeed. We also know that AT solutions need to be tailored to the individual. Together, Texthelp and Don Johnston Inc. are committed to providing a range of tools that educators and students can choose from.
We'll work together to deliver the best experience for our users. We're combining our resources to strengthen all of our products, leveraging technology, knowledge and skills across the group to help educators deliver the best possible learning experience for students.
You'll see the benefit of this new collaboration straight away. In the first few weeks for example:
Snap&Read will be able to read math in EquatIO out loud
Co:Writer will work in OrbitNote
uPAR will recognize if Read&Write or Snap&Read is installed and will link to appropriate resources
You may also find this FAQ document useful. We've included it as a helpful resource for sharing this exciting announcement with any colleagues and peers.
Together we can achieve more
This is the first step in an exciting journey for us all. But for now, it's very much business as usual.
We strongly believe that together we can achieve more, and we're excited to see what the future holds. We hope that you will join us on this journey as we strive to help one billion people across the world by 2030.
Press Release: Don Johnston's Curriculum Division Forges New Company, Building Wings™
Press Release: Don Johnston Incorporated Joins Texthelp Group
Read, Organize, Annotate — Your 360 Degree Reading Toolkit
We love what we do. Here's why.
Inclusion Guru: Kathy White's 6 Accessibility Strategies that Got Results
New Readtopia Thematic Unit—Fact or Fiction anchored by The Wizard of Oz brings inquiry to the special education classroom
How to Harness the Power of Student Self-Advocacy to Drive IEP Outcomes
Helping children with dyslexia succeed: Ptahra's recommendations for empowering struggling readers


text:
\section{Introduction}
\noindent

Asymmetrical models for a real-valued random variable such as the Gumbel and generalized extreme value distributions have been extensively utilized for modeling various random phenomena encountered for instance in the course of certain environmental, financial or reliability studies.

Let $Y_1, Y_2, \dots, Y_n$ be a series of independent random
variables with common distribution function $F$, and
$M_n= \max\{ Y_1, Y_2, \dots, Y_n \}$. The Gumbel distribution is one of the extreme value distributions, characterized by Fisher and Tippet (1928) \cite{FT28} as the limit distribution for maxima. That is, if exist the normalization sequences $ a_n $ and $ b_n> 0 $ such that $ P[(M_n-a_n) / b_n] $ converges to a non-degenerate distribution $G$, then $G$ is an extreme value distribution. The $G$ distribution must be one of three types: Fréchet,  Gumbel or negative Weibull. Among these three distributions the Gumbel distribution (see Gumbel (1958) \cite{G58} ) is the only one with a light tail. For this reason it can be considered  as a good alternative for modeling extreme data whose tails are not heavy.

A random variable $Y$ have a Gumbel distribution with location parameter $\mu\in\mathbb{R}$ and scale paramer $\sigma>0$,  denoted by
$Y\sim F_G(\cdot;\mu,\sigma)$, if its probability density function (PDF) and cumulated distribution function (CDF) are given, respectively,  by
\begin{eqnarray}\label{pdf1}
f_G(y;\mu,\sigma)
=
\frac{1}{\sigma}\exp\biggl\{-\Big(\frac{y-\mu}{\sigma} \Big)-\exp\Big[-\Big(\frac{y-\mu}{\sigma} \Big)\Big]\biggr\}
\quad
\end{eqnarray}
and
\begin{eqnarray}\label{cdfgev1}
F_G(y;\mu,\sigma)
=
\displaystyle
\exp\biggl\{-\exp\Big[-\Big(\frac{y-\mu}{\sigma} \Big)
\Big]  \biggr\}, \quad y\in \mathbb{R}.
\end{eqnarray}

Generalizations of the Gumbel distribution have been proposed by several authors. Pinheiro and Ferrari (2015) \cite{Pinheiro15} carried out a comprehensive review of the generalization of Gumbel distribution and after comparing them they   conclude that some distributions suffer  from overparameterization. Another generalization of Gumbel is the Exponentiated Gumbel Type-2 by  Okorie (2016) \cite{Okorie2016} and the references in  \cite{Okorie2017} and \cite{Pinheiro15}.

Despite its broad applicability in many fields the Gumbel is not suitable to model
bimodal data. Furthermore, all the models cited above are not suitable for capturing this.
In this context, in this paper, we propose the bimodal Gumbel (BG)  distribution as an alternative model of extreme data with more than one mode.
Our approach consists of introduce bimodality in \eqref{pdf1} as Elal-Olivero (2010) \cite{EL10}.  Results involving bimodality
in other related probabilistic models  can be found, for example,
in	Martinez et al. (2013) \cite{MAJS13}, Çankaya et al. (2015) \cite{CBDA15};
and more recently, in Vila et al. (2020-2021) \cite{VLSSS19,VFSPO20,VC20, VHR21}.
The advantage of our model in comparison to other generalizations of the Gumbel distribution is the number of parameters and the fact that it can be used to model extreme data with one or two modes.

This paper is organized as follows. In Section \ref{Sec:2}, we define the BG distribution.
In Section \ref{Sec:3}, we provide general properties of the BG distribution including the cumulative distribution function, hazard rate function, mode, bimodality, moment generating function and moments, and stochastic representation.
In Section \ref{Sec:4}, we provide graphical illustrations.
Estimation of the parameters by maximum likelihood is investigated in Section \ref{Sec:5}.
In Section \ref{Sec:6}, we discuss an application to real data.
Some conclusions are addressed in Section \ref{Sec:7}.

\section{The bimodal Gumbel model}\label{Sec:2}
\noindent
We said that a real-valued random variable $X$ has a bimodal Gumbel (BG) distribution with parameters $ \mu\in\mathbb{R}, \sigma>0$ and $\delta\in\mathbb{R}$,
denoted by $X\sim F_{\rm BG}(\cdot;\mu,\sigma, \delta)$, if its PDF is given by
\begin{eqnarray}\label{pdfbgev2}
	f_{\rm BG}(x;\mu,\sigma, \delta)
	=
	{ \displaystyle
	\big[(1-\delta x)^2+1\big]
	\exp\biggl\{-\Big(\frac{x-\mu}{\sigma} \Big)-\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big]\biggr\}
	\over \textstyle
	\sigma\big[
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
	\big]
}
,  \quad x\in \mathbb{R},
\end{eqnarray}
where $\gamma$  is the Euler's constant.

Let
\begin{eqnarray}\label{partition}
	Z_{\delta}
	=
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
\end{eqnarray}
be the normalization constant of the BG distribution \eqref{pdfbgev2}. Using this notation, note that
$f_{\rm BG}(x;\mu,\sigma, \delta)=	{1 \over Z_{\delta}}\,[(1-\delta x)^2+1] \,  f_{\rm G}(x;\mu,\sigma)$ and that $f_{\rm BG}(x;\mu,\sigma, 0)=f_{\rm G}(x;\mu,\sigma)$. In other words, we introduce bimodality in the Gumbel distribution \eqref{pdf1} through  of a quadratic transformation $(1-\delta x)^2+1$.

The BG distribution  function \eqref{pdfbgev2} is well defined, because
\begin{eqnarray*}
	\int_{-\infty}^{\infty}f_{\rm BG}(x;\mu,\sigma, \delta) \,{\rm d}x
	&=&
	{1 \over Z_{\delta}}\,
	[1+\mathbb{E}(1-\delta Y)^2], \quad Y\sim F_G(\cdot;\mu,\sigma)
	\\[0,1cm]
	&=&
	{1 \over Z_{\delta}}\,
	\big\{1+ \delta^2\mathrm{Var}(Y)+[\delta\,\mathbb{E}(Y)-1]^2\big\}
	=1,
\end{eqnarray*}
where $\mathbb{E}(Y)=\mu+\sigma\gamma$   and
$\mathrm{Var}(Y)=\sigma^2{\pi^2\over 6}$.

\smallskip

The CDF of a BG random variable $X\sim F_{\rm BG}(\cdot;\mu,\sigma, \delta)$, defined for  $x\in\mathbb{R}$, is given by (see Subsection \ref{CDF} for more details)
\begin{align} \label{cdfbgev2-1}
F_{\rm BG}(x; \mu,\sigma, \delta)
=&
{\displaystyle
	\big[2-\delta\mu(2-\delta\mu)\big]
	\exp\biggl\{-\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big]\biggr\}
	+
	\delta^2\sigma^2
	I\biggl(2;\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big],+\infty\biggr)
	\over
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
}
\nonumber
\\[0,2cm]
&
+
{\displaystyle
	2\delta(1-\delta\mu)
	\Biggl\{
	{(x-\mu)} \,
	\exp\biggl\{-\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big]\biggr\}
	-
	\sigma
	\Gamma\biggl(0,\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big]\biggr)\Biggr\}
	\over
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
},
\end{align}
where $\Gamma(a,b)$ is the upper incomplete gamma function and
\begin{eqnarray}\label{Iab}
I(k;a,b)=(-1)^k \int_{a}^{b} \ln^k(v) \exp(-v) \, {\rm d}v,
\quad k\in\mathbb{N}\cup\{0\}, \ 0\leqslant a<b\leqslant +\infty
\end{eqnarray}
is the incomplete moments of the random variable $V\sim F_G(\cdot;0,1)$.
For $k > 1$, closed form solutions for the definite integral $I(k;a,b)$ are not available in terms of commonly used functions.

From the formula in \eqref{cdfbgev2-1},
when $\delta=0$,
$F_{\rm BG}(x; \mu,\sigma, 0)
=
\exp\{-\exp[-(\frac{x-\mu}{\sigma} )
]\}
=F_G(x;\mu,\sigma)$, $x\in\mathbb{R}$, what was known in \eqref{cdfgev1}.

\begin{remark1}\label{eq-main}
	Let $X\sim F_{\rm BG}(\cdot;\mu,\sigma, \delta)$ and let $g(\cdot)$ be a real-valued Borel measurable function.
	From definition of expectation  and by using  the PDF of the BG distribution \eqref{pdfbgev2}, we have
	\begin{eqnarray*}
	\mathbb{E}[g(X)]
		&=&
	{1 \over Z_{\delta}}\,
	\mathbb{E}\big[g(Y)(1-\delta Y)^2+g(Y)\big]
	\\[0,1cm]
	&=&
	{1 \over Z_{\delta}}\,
	\big\{ 2\mathbb{E}[g(Y)]
	-2\delta \mathbb{E}[Yg(Y)]
	+
	\delta ^2 \mathbb{E}[Y^2g(Y)]\big\},
	\end{eqnarray*}
	where $Y\sim F_G(\cdot;\mu,\sigma)$ and $Z_\delta$ is as in \eqref{partition}.
\end{remark1}

\section{Some properties of the BG distribution} \label{Sec:3}
\noindent

In this section, some mathematical properties as closed expression for the CDF, rate, modes, bimodality, hazard function and moments of the  BG distribution are discussed.

\subsection{Cumulative distribution function}\label{CDF}
\noindent

In this subsection, we derive in detail the closed expression in \eqref{cdfbgev2-1} for the CDF of a BG random variable $X\sim F_{\rm BG}(\cdot;\mu,\sigma, \delta)$.

Indeed, from Remark \ref{eq-main} with $g(X)=\mathds{1}_{X\leqslant x}$, we obtain
\begin{eqnarray}\label{cdfbgev2}
F_{\rm BG}(x; \mu,\sigma, \delta)
=
\frac{1}{Z_{\delta}}
\big[ 2F_{\rm G}(y; \mu, \sigma)
-2\delta \mathbb{E}\left( Y \mathds{1}_{Y\leq x}\right)
+
\delta ^2 \mathbb{E}\left( Y^2 \mathds{1}_{Y\leq x}\right)\big],
\end{eqnarray}
where $Y\sim F_G(\cdot;\mu,\sigma)$ and $Z_{\delta}$ is as in \ref{partition}.

Taking the following change of variables
$
z=\exp[-({y-\mu})/{\sigma} ], \
{\rm d} z= -({z/\sigma}) {\rm d}y,
\ y=\mu-\sigma\ln(z),
$
and using a binomial expansion we have
\begin{eqnarray}\label{form-mom-trunc}
\mathbb{E}\big( Y^k \mathds{1}_{Y\leq x}\big)
&=&
\int_{\exp[-(\frac{x-\mu}{\sigma} )]}^{+\infty}
[\mu-\sigma\ln(z)]^k \exp(-z)\, {\rm d}z
\nonumber
\\[0,2cm]
&=&
\sum_{i=0}^{k} \binom{k}{i} (-1)^i \mu^{k-i}\sigma^i \int_{\exp[-(\frac{x-\mu}{\sigma} )]}^{+\infty}
\ln^i(z) \exp(-z)\, {\rm d}z
\nonumber
\\[0,2cm]
&=&
\sum_{i=0}^{k} \binom{k}{i} \mu^{k-i}\sigma^i \, I\biggl(i;\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big],+\infty\biggr),
\end{eqnarray}
where $k\in\mathbb{N}\cup\{0\}$ and $I(i;a,b)$ is as in  \eqref{Iab}. By combining \eqref{cdfbgev2} and \eqref{form-mom-trunc}, and by using the relations
\begin{eqnarray*}
I(0;a,+\infty)&=&\exp(-a),
\\[0,2cm]
I(1;a,+\infty)&=& -\exp(-a)\ln(a) -\Gamma(0,a),
\end{eqnarray*}
we get formula \eqref{cdfbgev2-1}.

\subsection{Stochastic representation}

Suppose $Y_{k}$ has a weighted Gumbel distribution with parameters
$\mu\in\mathbb{R}$ and $\sigma>0$. That is, if  $Y\sim F_{\rm G}(\cdot;\mu,\sigma)$, by \eqref{form-mom-trunc}, $Y_k$ has CDF given by, for each $x\in\mathbb{R}$ and $k=0,1,2,\ldots$,
\begin{align}
F_{Y_k}(x)={\mathbb{E}\big( Y^k \mathds{1}_{Y\leq x}\big)\over\mathbb{E}( Y^k)}
=
\frac{\displaystyle \sum_{i=0}^{k} \binom{k}{i} \mu^{k-i}\sigma^i \, I\biggl(i;\exp\Big[-\Big(\frac{x-\mu}{\sigma}\Big)\Big],+\infty\biggr)}
{\displaystyle \sum_{i=0}^{k} \binom{k}{i} \mu^{k-i}\sigma^i \, I(i;0,+\infty)}, \label{cdf-weighted}
\end{align}
where $I(k;a,b)$ is the incomplete moments defined in \eqref{Iab}.
Note that $F_{Y_0}(x)=F_{\rm G}(x;\mu,\sigma)$.

Let $W$ be a discrete random variable, so that $W=1$ or $W=2$ or $W=3$, each with probability
\begin{align*}
p_1={2\over Z_\delta}, \quad
p_2=-{2(\mu+\sigma\gamma)\delta \over Z_\delta},
\quad
p_3={[\sigma^2{\pi^2\over 6}+(\mu+\sigma\gamma)^2]\delta^2 \over Z_\delta },
\end{align*}
respectively, where $[\delta>0 \, \text{and} \, \mu+\sigma\gamma<0]$ or $[\delta<0 \, \text{and} \, \mu+\sigma\gamma>0]$, and $Z_\delta$ is as in \eqref{partition}. It is straightforward see that $p_1+p_2+p_3=1$.

Assume that
$$T
=
\sum_{k=1}^{3}{1\over k}\, Y_{k-1} \delta_{W,k} \delta_{W,l},
\quad l=1,2,3,
$$
and that $W$ is independent of $Y_{l}$, for each $l=1,2,3$. Here $\delta_{x,y}$ is the Kronecker delta  function, i.e., this function is 1 if the variables are equal, and 0 otherwise.

\begin{proposition}
The following holds
\begin{align}\label{claim-stochastic-rep}
X=WT \ \
\text{if and only if} \ \ X\sim F_{\rm BG}(\cdot;\mu,\sigma,\delta).
\end{align}
\end{proposition}
\begin{proof}
By Law of total probability and by independence, we get
\begin{align*}
\mathbb{P}(X\leqslant x)
=
\mathbb{P}(WT\leqslant x)
&=
\sum_{l=1}^{3}
\mathbb{P}(WT\leqslant x\vert W=l)\mathbb{P}(W=l)
\\[0,15cm]
&=
\sum_{l=1}^{3}
\mathbb{P}(Y_{l-1}\leqslant x\vert W=l)\mathbb{P}(W=l)
=
\sum_{l=1}^{3}
F_{Y_{l-1}}(x)\, p_l.
\end{align*}
By using the CDF of the weighted Gumbel distribution, given in \eqref{cdf-weighted}, and by definitions of $p_l$'s and $Z_\delta$, the above expression is
\begin{align*}
&=
{2\over Z_\delta} \,  F_{Y_{0}}(x)
-
{2(\mu+\sigma\gamma)\delta \over Z_\delta}\, F_{Y_{1}}(x)
+
{[\sigma^2{\pi^2\over 6}+(\mu+\sigma\gamma)^2]\delta^2 \over Z_\delta }\, F_{Y_{2}}(x)
\\[0,15cm]
&=
{2\over Z_\delta}\,
F_{\rm G}(x;\mu,\sigma)
-
{2(\mu+\sigma\gamma)\delta \over Z_\delta}\,
\frac{\displaystyle \sum_{i=0}^{1} \binom{1}{i} \mu^{1-i}\sigma^i \, I\biggl(i;\exp\Big[-\Big(\frac{x-\mu}{\sigma}\Big)\Big],+\infty\biggr)}
{\displaystyle \sum_{i=0}^{1} \binom{1}{i} \mu^{1-i}\sigma^i \, I(i;0,+\infty)}
\\[0,15cm]
&\quad
+
{[\sigma^2{\pi^2\over 6}+(\mu+\sigma\gamma)^2]\delta^2 \over Z_\delta }\,
\frac{\displaystyle \sum_{i=0}^{2} \binom{2}{i} \mu^{2-i}\sigma^i \, I\biggl(i;\exp\Big[-\Big(\frac{x-\mu}{\sigma}\Big)\Big],+\infty\biggr)}
{\displaystyle \sum_{i=0}^{2} \binom{2}{i} \mu^{2-i}\sigma^i \, I(i;0,+\infty)}
\\[0,15cm]
&=
{\displaystyle
	\big[2-\delta\mu(2-\delta\mu)\big]
	\exp\biggl\{-\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big]\biggr\}
	+
	\delta^2\sigma^2
	I\biggl(2;\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big],+\infty\biggr)
	\over
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
}
\nonumber
\\[0,2cm]
&\quad
+
{\displaystyle
	2\delta(1-\delta\mu)
	\Biggl\{
	{(x-\mu)} \,
	\exp\biggl\{-\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big]\biggr\}
	-
	\sigma
	\Gamma\biggl(0,\exp\Big[-\Big(\frac{x-\mu}{\sigma} \Big)\Big]\biggr)\Biggr\}
	\over
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
}
\\[0,15cm]
&\stackrel{\eqref{cdfbgev2-1}}{=}
F_{\rm BG}(x; \mu,\sigma, \delta),
\end{align*}
where $\Gamma(a,b)$ is the upper incomplete gamma function.

Then the statement in \eqref{claim-stochastic-rep} follows.
\end{proof}

\subsection{Rate of a random variable with BG distribution}
\noindent

Following Klugman et al. (1998) \cite{Klugman1998},
for a continuous random variable $X$ with density function $f_X(x)$, the rate of a random variable is given by
\begin{eqnarray*}
\tau_X=-\lim_{x\to\infty} {{\rm d} \ln\big[f_X(x)\big]\over {\rm d}x}.
\end{eqnarray*}
A simple computation shows that
$
\tau_{{\rm BG}(\mu,\sigma, \delta)}
=
{1/\sigma}.
$

In what follows we present some comparisons between the rates of random variables with known distributions: Inverse-gamma, Log-normal, Generalized-Pareto, BWeibull (see Vila et al. 2020 \cite{VC20}), BGamma (see Vila et al. 2020 \cite{VFSPO20}), BG, exponential and Normal;
	\begin{align*}
	\tau_{{\rm InvGamma}(\alpha,\sigma)}
	=
	\tau_{{\rm LogNorm}(\mu,\kappa^2)}
	&=
	\tau_{{\rm GenPareto}(\alpha,\sigma, \zeta)}
		=
	\tau_{\rm BWeibull(\alpha<1,\sigma,\delta)}
	=0
	\\[0,1cm]
	&<
	\tau_{{\rm BG}(\mu,\sigma, \delta)}=
	\tau_{\rm BWeibull(\alpha=1,\sigma,\delta)}=
	\tau_{{\rm BGamma}(\alpha,1/\sigma,\delta)}=
	\tau_{{\rm exp}(1/\sigma)}=1/\sigma
	\\[0,1cm]
	&<
	\tau_{\rm BWeibull(\alpha>1,\sigma,\delta)}
	=
	\tau_{{\rm Normal}(\mu,\kappa^2)}=+\infty.
	\end{align*}
In other words, far enough out in the tail, every BG distribution looks like an exponential distribution.

\subsection{Bimodality}
\noindent
\begin{proposition}

	A point  $x\in\mathbb{R}$ is a mode of the {\rm BG} density \eqref{pdfbgev2} if it is a root of the following non-polynomial function:
	\begin{eqnarray} \label{g-def-0}
g(x)=
{1\over \sigma}\biggl\{\exp\Big[-\Big({x-\mu\over\sigma}\Big)\Big]-1\biggl\}
-
{2\delta (1-\delta x)\over (1-\delta x)^2+1}.
	\end{eqnarray}
\end{proposition}
\begin{proof}
Taking the derivative of $f_{\rm BG}(x;\mu,\sigma)$ with respect to $x$, we have
	\begin{eqnarray}\label{f-der-relation}
	{f'_{\rm BG}(x;\mu,\sigma)}
	=
	f_{\rm BG}(x;\mu,\sigma)
g(x).
	\end{eqnarray}
Hence, the proof follows.
\end{proof}

Let $\mathcal{C}$ be the set formed for all $(\mu,\sigma,\delta)\in\mathbb{R}\times(0,+\infty)\times \mathbb{R}$ such that the following hold:
\begin{align}
&\delta
>\max\biggl\{1,
{1\over \sigma}
\Big[\exp\Big({\mu\over\sigma}\Big)-1\Big]\biggr\},
\label{cond1}
\\[0,2cm]
&{2\delta (1+\delta)\over (1+\delta)^2+1}
<
{1\over \sigma}
\Big\{\exp\Big({1+\mu\over\sigma}\Big)-1\Big\},
\label{cond2}
\\[0,2cm]\
&{2\delta (1-2\delta)\over (1-2\delta)^2+1}
<
{1\over \sigma}
\biggl\{\exp\Big[-\Big({2-\mu\over\sigma}\Big)\Big]-1\biggl\},
\label{cond3}
\\[0,2cm]
&{2\delta (1-3\delta)\over (1-3\delta)^2+1}
>
{1\over \sigma}
\biggl\{\exp\Big[-\Big({3-\mu\over\sigma}\Big)\Big]-1\biggl\}.
\label{cond4}
\end{align}
\begin{remark1} \label{rem-C}
By considering $\mu=\sigma=1$ and $\delta>{\rm e}-1$, we have that $(\mu,\sigma,\delta)\in \mathcal{C}$.
That is, the set $\mathcal{C}$ is non-empty.
\end{remark1}

\begin{lemma}\label{lemma-existence}
If $(\mu,\sigma,\delta)\in \mathcal{C}$ then the function $g(x)$ has at least three distinct real roots.
\end{lemma}
\begin{proof}
Since $(\mu,\sigma,\delta)\in \mathcal{C}$, a simple observation in the definition \eqref{g-def-0} of $g(x)$ shows that
\begin{itemize}
\item
$\displaystyle g(-1)
=
{1\over \sigma}
\Big\{\exp\Big({1+\mu\over\sigma}\Big)-1\Big\}
-
{2\delta (1+\delta)\over (1+\delta)^2+1}>0,
$
because of condition \eqref{cond2};
\item
$\displaystyle g(0)
={1\over\sigma} \Big\{\exp\Big({\mu\over\sigma}\Big)-1\Big\}-\delta<0$,
because of condition \eqref{cond1};
\item
$\displaystyle
g(2)
=
{1\over \sigma}
\biggl\{\exp\Big[-\Big({2-\mu\over\sigma}\Big)\Big]-1\biggl\}
-
{2\delta (1-2\delta)\over (1-2\delta)^2+1}>0
$,
because of condition \eqref{cond3};
\item
$\displaystyle
g(3)
=
{1\over \sigma}
\biggl\{\exp\Big[-\Big({3-\mu\over\sigma}\Big)\Big]-1\biggl\}
-
{2\delta (1-3\delta)\over (1-3\delta)^2+1}<0
$,
because of condition \eqref{cond4}.
\end{itemize}
Since $g(x)$ is a continuous real-valued function, by Intermediate Value Theorem, there are some points $r_1, r_2, r_3$, with $-1<r_1<0$, $0<r_2<2$ and $2<r_3<3$, so that $g(r_i)=0$, $i=1,2,3$.
\end{proof}

Let $\mathcal{D}$ be the set formed for all $x\in\mathbb{R}$ such that
\begin{eqnarray*}
2\delta^2 \,
{(1-\delta x)^2-1\over (1-\delta x)^2+1}
&<&
-{1\over \sigma^2}
\exp\Big[-\Big({x-\mu\over\sigma}\Big)\Big]
\quad \text{where} \ (\mu,\sigma,\delta)\in \mathcal{C}.
\end{eqnarray*}
\begin{remark1} \label{remark-D}
The set $\mathcal{D}$ is non-empty. To see this just take $\mu=\sigma=1$ and $\delta=2$ $(>{\rm e}-1)$. By Remark \ref{rem-C}, $(\mu,\sigma,\delta)\in \mathcal{C}$. In this case we have $\mathcal{D}=(0.132178,0.937349)$.
\end{remark1}

\begin{lemma}\label{lemma-existence-1}
If $(\mu,\sigma,\delta)\in \mathcal{C}$ then the function $g(x)$ has no root outside the interval $(-1,3)$.

Futhermore, if  $-1<r_1<0$, $0<r_2<2$ and $2<r_3<3$ are the roots of $g(x)$ found in  Lemma \ref{lemma-existence}, so that $r_2\in \mathcal{D}\subset (0,2)$, then these roots are unique.
\end{lemma}
\begin{proof}
Taking the derivative of $g(x)$ with respect to $x$, we have
\begin{eqnarray*
g'(x)
=
-{1\over \sigma^2}
\exp\Big[-\Big({x-\mu\over\sigma}\Big)\Big]
-
2\delta^2 \,
{(1-\delta x)^2-1\over (1-\delta x)^2+1}.
\end{eqnarray*}
Since, for
$x\leqslant 0$ or $x\geqslant 2/\delta$,
$
2\delta^2 \,
{[(1-\delta x)^2-1] / [(1-\delta x)^2+1]} \geqslant 0,
$
 we obtain
\begin{eqnarray*}
g'(x)
\leqslant
-{1\over \sigma^2}
\exp\Big[-\Big({x-\mu\over\sigma}\Big)\Big]<0
\quad \text{for} \
x\leqslant 0 \ \text{ou} \ x\geqslant 2/\delta.
\end{eqnarray*}
In other words, outside of the interval $(-1, 3)$ the function $g(x)$ has no zeros because this one is decreasing on $(-\infty,0]\cup[2/\delta,+\infty)$ with  $2/\delta<2$ (by condition \eqref{cond1}). This implies that the roots $-1<r_1<0$ and $2<r_3<3$, of $g(x)$,  are unique in at their respective intervals. Finally, since $r_2\in \mathcal{D}$ we have that the function $g(x)$ crosses the abscissa axis at the only point $r_2$. Therefore, we conclude that the root $r_2$ is also unique in $\mathcal{D}\subset (0,2)$.
\end{proof}

\begin{remark1}
	Let $\mu=\sigma=1$ and $\delta=2$ $(>{\rm e}-1)$. By Remark \ref{remark-D}, $\mathcal{D}=(0.132178,0.937349)$.   Computationally it can be verified that $-1<r_1= -0.0896138<0, 0<r_2= 0.389792<2$ and $2<r_3 = 2.79117<3$ are the only roots of $g(x)$, with $r_2\in \mathcal{D}$.
\end{remark1}

\begin{thm1}[Bimodality]\label{Bimodality}
If $r_2\in \mathcal{D}$ then the {\rm BG} distribution \eqref{pdfbgev2} is bimodal.
\end{thm1}
\begin{proof}
By Lemma \ref{lemma-existence-1} the function $g(x)$ in \eqref{g-def-0} has exactly three roots $r_1, r_2, r_3$ so that $r_1<r_2<r_3$.
Since $f_{\rm BG}(x;\mu,\sigma)\to 0$ as $x\to \pm\infty$, it follows that the {\rm BG} distribution \eqref{pdfbgev2} increases on the intervals $(-\infty, r_1)$
and $(r_2, r_3)$, and decreases on $(r_1, r_2)$ and $(r_3, +\infty)$. That is, $r_1$ and $r_3$ are two
maximum points and $r_2$ is the unique minimum point. Therefore, the bimodality of $f_{\rm BG}(x;\mu,\sigma)$ is guaranteed.
\end{proof}

\subsection{The hazard function}
\noindent

The survival and hazard functions, denoted by SF and HR  of the BG is given
by  $S_{\rm BG}(x;\mu,\sigma, \delta) = 1 -F_{\rm BG}(x;\mu,\sigma, \delta)$ and
$
	H_{\rm BG}(x;\mu,\sigma, \delta)
	=
	{
		f_{\rm BG}(x;\mu,\sigma, \delta)
		/
		[1-F_{\rm BG}(x;\mu,\sigma, \delta)]
	}.
$

Considering $r_1, r_2, r_3$ the three distinct real roots, of function $g(x)$, found in  Lemma \ref{lemma-existence}, we state the following result.
\begin{proposition
If $r_2\in \mathcal{D}$ then
the HR $H_{\rm BG}(x;\mu,\sigma,\delta)$ of the {\rm BG} distribution \eqref{pdfbgev2} has the following monotonicity properties:
	\begin{itemize}
		\item[\rm 1)] It is increasing for each $x<r_1$ or $r_2<x< r_3$,
		\item[\rm 2)] It is decreasing for each $x\in\mathcal{D}$.
	\end{itemize}
\end{proposition}
\begin{proof}
As a sub-product of the proof of Theorem \ref{Bimodality}, note that the density $f_{\rm BG}(x;\mu,\sigma,\delta)$ is increasing on the intervals $x<r_1$ or $r_2<x< r_3$.
Since $1-F_{\rm BG}(x;\mu,\sigma, \delta)$ is a decreasing function, we have that the hazard function on $x<r_1$ or $r_2<x< r_3$ is the product of two increasing and nonnegative functions, then the proof of first item follows.

	By Glaser (1980), for to prove the second item, it is enough to prove that the function $G_X(x)$, defined as
	\begin{eqnarray*}
	G_X(x)
	=
	-{f_{\rm BG}'(x;\mu,\sigma, \delta) \over f_{\rm BG}(x;\mu,\sigma, \delta)}\stackrel{\eqref{f-der-relation}}{=}-g(x),
	\end{eqnarray*}
	is decreasing for each $x\in\mathcal{D}$.
But this is immediate since $g(x)$ is increasing on this interval.
\end{proof}

\subsection{Moment-Generating Function}
\noindent

\begin{thm1}\label{mgf-1}
	If $X\sim F_{\rm BG}(\cdot; \mu,\sigma, \delta)$,  $t<\min\{0, -m/\sigma\}$ and $m\in\mathbb{N}\cup\{0\}$, we have

	\begin{align*}
	\mathbb{E}\big[X^m\exp(tX)\big]
	&=
	(-1)^{m+2}
	\exp(t\mu)\,
	\dfrac{
		\delta^2\sigma^{m+2} \,
		\Gamma^{(m+2)}(1-\sigma t)
		+
		\delta\sigma^{m+1}\big[2-\delta\mu(m+2)\big] \,
		\Gamma^{(m+1)}(1-\sigma t)
	}{
		1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
	}
	\\[0,5cm]
	&+
	\dfrac{	\exp(t\mu)\,
		\sum_{i=0}^{m}
		(-1)^i
		\sigma^i\mu^{m-i}
		\big[
		2\binom{m}{i}
		-
		2\delta\mu\binom{m+1}{i}
		+
		\delta^2\mu^{2} \binom{m+2}{i}
		\big]
	\Gamma^{(i)}(1-\sigma t)
}{
		1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
	},
\end{align*}
}
where $\Gamma^{(i)}(x)={{\rm d}^i \Gamma(x)/ {\rm d}x^i}$.
\end{thm1}
\begin{proof}

	Taking $g(X)=X^m\exp(tX)$ in Remark \ref{eq-main},
	\begin{align}\label{eq-fgm}
\mathbb{E}\big[X^m\exp(t\,X)\big]
=
{1 \over Z_{\delta}}\,
\big\{
2 \, \mathbb{E}\big[Y^m\exp(t\,Y)\big]
-
2\delta \, \mathbb{E}\big[Y^{m+1} \exp(t\,Y)\big]
+
\delta^2 \, \mathbb{E}\big[Y^{m+2} \exp(t\,Y)\big]
\big\},
\end{align}
	where $ Y\sim F_{\rm G}(\cdot; 0,  \mu, \sigma)$ and    	 $Z_{\delta}$ are as in \eqref{cdfgev1} and \eqref{partition}, respectively.

Taking the change of variables
$
z=\exp[-({y-\mu})/{\sigma}], \
{\rm d} z= -({z/\sigma}) {\rm d}y,
\ y=\mu-\sigma\ln(z),
$
and using a binomial expansion we get, for $k=m,m+1,m+2$,
\begin{eqnarray}\label{form-mom-trunc-1}
\mathbb{E}\big[ Y^k \exp(tY)\big]
&=&
\int_{0}^{+\infty}
[\mu-\sigma\ln(z)]^k z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z, \quad k\in\mathbb{N}\cup\{0\}
\nonumber
\\[0,2cm]
&=&
\exp(\mu t)
\sum_{i=0}^{k} \binom{k}{i} (-1)^i \mu^{k-i}\sigma^i \int_{0}^{+\infty}
\ln^i(z)\, z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z.
\end{eqnarray}

\smallskip
We claim that
\begin{eqnarray}\label{claim-1}
\int_{0}^{+\infty}
\ln^i(z)\, z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z
=
\Gamma^{(i)}(1-\sigma t), \quad i=0,1,\ldots,k; \ k=m,m+1,m+2.
\end{eqnarray}
Note that, by combining \eqref{claim-1}, \eqref{form-mom-trunc-1} and \eqref{eq-fgm}, the proof of theorem follows.

Indeed, since ${\partial^j z^{\alpha-1}\over\partial \alpha^j}=\ln^j (z)\, z^{\alpha-1}$,  $j=1,2,\ldots i$,
\begin{eqnarray}\label{id-integral}
	\int_{0}^{+\infty}
	\ln^i(z)\, z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z
	=
	\int_{0}^{+\infty} 	\dfrac{\partial^j}{\partial(1-\sigma t)^j} \big[\ln^{i-j}(z)\,  z^{(1-\sigma t)-1} \exp(-z)\big]\, {\rm d}z.
\end{eqnarray}

Let us note that the following conditions hold true.
\begin{itemize}
	\item The derivatives
	\begin{eqnarray*}
		\dfrac{\partial^j}{\partial(1-\sigma t)^j}
		\big[\ln^{i-j}(z)\,  z^{(1-\sigma t)-1} \exp(-z)\big]
		=
		\ln^i(z)\, z^{(1-\sigma t)-1} \exp(-z)
	\end{eqnarray*}
	exists and are continuous in $1-\sigma t$ for all $z$ and all $1-\sigma t$, for $j=1,2,\ldots i$.
	\item
	By using the following inequalities
	\begin{eqnarray*}
	&&\vert \ln(z)\vert
	\leqslant {1\over z}\,   \mathds{1}_{\{x>0:x<1\}}(z)+  z\, \mathds{1}_{\{x>0:x\geqslant 1\}}(z),
	\\[0,2cm]
	&&	\vert \ln^i(z)\vert
	\leqslant {1\over z^{i-1}}\,
	\mathds{1}_{A_i}(z)+  z^{i-1}\, \mathds{1}_{B_i}(z), \quad i=2,3,\ldots,k,
	\end{eqnarray*}
where $A_i=\big\{x>0:x<{\rm e}^{i W({i-1\over i})/(i-1)}\big\}$, $B_i=\big\{x>0: x\geqslant {\rm e}^{i W({i-1\over i})/(i-1)}\big\}$, and $W$ is the product logarithm function (or Lambert $W$ function), we get
	\begin{align*}
		&
		\biggl\vert
		\dfrac{\partial^j}{\partial(1-\sigma t)^j}
		\big[\ln^{i-j}(z)\,  z^{(1-\sigma t)-1} \exp(-z)\big]
		\biggr\vert
		=
		\big\vert\ln^i(z)\big\vert\, z^{(1-\sigma t)-1} \exp(-z)
		\\[0,3cm]
		&\leqslant
		\begin{cases}
		z^{(1-\sigma t)-1} \exp(-z) & \text{if} \ i=0,
		\\[0,2cm]
		\big[
		z^{(1-\sigma t)-2}\,   \mathds{1}_{\{x>0:x<1\}}(z)+z^{(1-\sigma t)} \, \mathds{1}_{\{x>0:x\geqslant 1\}}(z) \big]\exp(-z) & \text{if} \ i=1,
		\\[0,2cm]
		\big[
		z^{(1-\sigma t)-i}\,
		\mathds{1}_{A_i}(z)
		+
		z^{(1-\sigma t)+i-2}\,
		\mathds{1}_{B_i}(z)
		\big] \exp(-z)
		& \text{if} \ i=2,3,\ldots,k,
		\end{cases}
		\eqqcolon
		G(z,1-\sigma t).
	\end{align*}
	Furthermore, the integral
	\begin{align*}
		\int_{0}^{+\infty}  G(z,1-\sigma t) \, {\rm d}z
		\leqslant
\begin{cases}
\Gamma(1-\sigma t) & \text{if} \ i=0, \ t<1/\sigma,
\\[0,2cm]
\Gamma(-\sigma t)
+\Gamma(2-\sigma t)
& \text{if} \ i=1, \ t<0,
\\[0,2cm]
\Gamma(2-\sigma t-i)
+
\Gamma(i-\sigma t)
& \text{if} \ i=2,3,\ldots,k, \ t<(2-k)/\sigma,
\end{cases}
\end{align*}
is finite, for $k=m,m+1,m+2$.
	\item The integral
	$
	\int_{0}^{+\infty} \ln^{i-j}(z)\,  z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z
	$
	exists because of last item above.
\end{itemize}
\smallskip
Under the above three conditions, by Leibniz integral rule,  we can interchange the derivative with the integral in \eqref{id-integral}. Hence, for  $j=1,2,\ldots i$,
\begin{eqnarray*}
\int_{0}^{+\infty}
\ln^i(z)\, z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z
	=
	\dfrac{{\rm d}^j}{{\rm d}(1-\sigma t)^j}
\int_{0}^{+\infty} \ln^{i-j}(z)\,  z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z.
\end{eqnarray*}
Letting $j=i$, we obtain
\begin{eqnarray*}
\int_{0}^{+\infty}
\ln^i(z)\, z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z
&=&
	\dfrac{{\rm d}^i}{{\rm d}(1-\sigma t)^i}
\int_{0}^{+\infty}  z^{(1-\sigma t)-1} \exp(-z)\, {\rm d}z \nonumber
\\[0,15cm]
&=&
\Gamma^{(i)}(1-\sigma t), \quad i=0,1,\ldots,
\end{eqnarray*}
where in the last line we used the definition of gamma function, $\Gamma(\alpha)=\int_{0}^{+\infty}  z^{\alpha-1} \exp(-z)\, {\rm d}z$. Then the claimed \eqref{claim-1} follows.

Thus, this complete the proof of theorem.
\end{proof}

By taking $m=0$ in Theorem \ref{mgf-1} we obtain a clossed expression for the moment-generating function of BGumbel distribution.
\begin{corollary}\label{mgf}
	If $X\sim F_{\rm BG}(\cdot; \mu,\sigma, \delta)$  then, the moment-generating function $M_X(t)=\mathbb{E}[\exp(tX)]$ with $t<0$, is given by
	\begin{eqnarray*}
		M_X(t)
		=
		{
			\exp(\mu t) \Gamma(1-\sigma t)
			\big[
			2-2\mu\delta+\mu^2\delta^2+2\sigma\delta(1-\mu\delta) \psi(1-\sigma t)+
			{\sigma^2\delta^2\over \Gamma(1-\sigma t)} \,
			\Gamma^{(2)}(1-\sigma t)
			\big]
			\over
			1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
		},
	\end{eqnarray*}
	where $\psi(x)=\Gamma'(x)/ \Gamma(x)$ is the digamma function and $\Gamma^{(2)}(1-\sigma t)={{\rm d}^2\Gamma(x)/ {\rm d} x^2}$.
\end{corollary}

\begin{remark1}
	Letting $\delta=0$ in Corollary \ref{mgf} we obtain the known formula $M_Y(t)=\exp(\mu t) \Gamma(1-\sigma t)$, where $Y\stackrel{d}{=}X\sim F_{\rm G}(\cdot; 0,  \mu, \sigma)$. Note that, by a  by-product of proof of Theorem \ref{mgf-1}, in this case it is sufficient take $t<1/\sigma$ instead $t<0$.
\end{remark1}
\begin{remark1}
The characteristic function of $X\sim F_{\rm BG}(\cdot; \mu,\sigma, \delta)$, denoted by $\phi_X(t)$, can be obtained from the moment-generating function by the relation $M_X(t) =\phi_X(-it)$.
\end{remark1}

\subsection{Moments}
\noindent

\begin{thm1}\label{car-moments}
	If $X\sim F_{\rm BG}(\cdot; \mu,\sigma, \delta)$  then
	\begin{eqnarray*}
	\mathbb{E}(X^k)
	=
	{\displaystyle
		\delta^2\sigma^{k+2}I(k+2;0,+\infty)
		-
		\delta\sigma^{k+1}\big[2-\delta\mu(k+2)\big]I(k+1;0,+\infty)
		\over
		1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
	}
	\\[0,2cm]
	+

		\sum_{i=0}^{k}
		\sigma^i\mu^{k-i}
		\big[
		2\binom{k}{i}
		-
		2\delta\mu\binom{k+1}{i}
		+
		\delta^2\mu^{2} \binom{k+2}{i}
		\big] I(i;0,+\infty)
		\over
		1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
	},
	\end{eqnarray*}
	where $I(i;a,b)$ is defined in  \eqref{Iab}.
\end{thm1}
\begin{proof}
	From Remark \ref{eq-main} with $g(X)=X^k$, we obtain
	\begin{eqnarray}\label{eq-1}
	\mathbb{E}(X^k)
	&=&
	{1 \over Z_{\delta}}\,
	\big[
	2 \, \mathbb{E}(Y^{k})
	-
	2\delta \, \mathbb{E}(Y^{k+1})
	+
	\delta^2 \, \mathbb{E}(Y^{k+2})
	\big],
	\end{eqnarray}
	where $ Y\sim F_{\rm G}(\cdot; 0,  \mu, \sigma)$ is as in \eqref{cdfgev1}.

	By taking $x\longrightarrow +\infty$ in \eqref{form-mom-trunc}, Lebesgue dominated convergence theorem gives
	\begin{eqnarray}\label{eq-2}
	\mathbb{E}(Y^k)
	=
	\lim_{x\to +\infty}
	\mathbb{E}\big( Y^k \mathds{1}_{Y\leq x}\big)
	=
	\sum_{i=0}^{k} \binom{k}{i} \mu^{k-i}\sigma^i \, I(i;0,+\infty).
	\end{eqnarray}

	By combining \eqref{eq-1} and \eqref{eq-2}, the proof follows.
\end{proof}

\begin{corollary
	If  $X\sim F_{\rm BG}(\cdot; \mu,\sigma,\delta)$  then
	\begin{align}\label{mean}
		\mathbb{E}(X)
	&=
	{
\delta^2\sigma^3\big[2\zeta(3) + \gamma^3 + {\gamma \pi^2\over 2}\big]
-
\delta\sigma^2(2-3\delta\mu)\big(\gamma^2+{\pi^2\over 6}\big)
+
\mu\big[2-\delta\mu(2-\delta\mu)\big]
+
\sigma\big[2-\delta\mu(4-3\delta\mu)\big]\gamma
		\over
		1+\delta^2\sigma^2{\pi^2\over 6}
		+
		(\delta\mu+\delta\sigma\gamma-1)^2
	},
\\[0,2cm]
\label{2moment}
	\mathbb{E}(X^2)
	&=
	{
     \delta^2\sigma^4\big[8\gamma \zeta(3) + \gamma^4 + \gamma^2 \pi^2 + {3 \pi^4\over 20}\big]
     -
     2\delta\sigma^3(1-2\delta\mu)\big[2\zeta(3) + \gamma^3 + {\gamma \pi^2\over 2}\big]
     +
     \mu^2\big[2-\delta\mu(2-\delta\mu)]
		\over
		1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
	}
	\nonumber\\
	&+
	{
     2\sigma\mu\big[2-\delta\mu(3-2\delta\mu)\big]\gamma
+
2\sigma^2\big[1-3\delta\mu(1-\delta\mu)\big] \big(\gamma^2+{\pi^2\over 6}\big)
		\over
		1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
	},
\\[0,2cm]
	%
	\mathbb{E}(X^3)
	&=
{
\delta^2\sigma^5\big[20\gamma^2\zeta(3) + {10 \pi^2 \zeta(3)\over 3} + 24\zeta(5) + \gamma^5 + {5\gamma^3 \pi^2\over 3} + {3 \gamma \pi^4\over 4}\big]
\over
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
}
\nonumber	\\
&+
{
\mu^3 \big[2-\delta\mu(2-\delta\mu)\big]
+
\sigma\mu^2\big[6-\delta\mu(8-5\delta\mu)\big]\gamma
+
2\sigma^2\mu\big[3-\delta\mu(6-5\delta\mu)\big] (\gamma^2+{\pi^2\over 6})
	\over
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
}
\nonumber	\\
&+
{
2\sigma^3\big[1-\delta\mu(4-5\delta\mu)\big]\big[2\zeta(3) + \gamma^3 + {\gamma \pi^2\over 2}\big]
-
\delta\sigma^4(2-5\delta\mu)\big[8\gamma \zeta(3) + \gamma^4 + \gamma^2 \pi^2 + {3 \pi^4\over 20}\big]
	\over
	1+\delta^2\sigma^2{\pi^2\over 6}+(\delta\mu+\delta\sigma\gamma-1)^2
},	\nonumber
	\end{align}
	where
	$\gamma$  is the Euler-Mascheroni constant and $\zeta(s)$ is the
	Riemann zeta function.
\end{corollary}
\begin{proof} By combining Theorem \ref{car-moments} with the following values for the
improper integral $I(k;0,+\infty)$ in \eqref{Iab}, with $k =0,1,2,3,4$ and $5$,
	\begin{eqnarray}\label{improper-int}
		\begin{array}{lllll}
		I(0;0,+\infty)&=&1,
		\\[0,1cm]
		I(1;0,+\infty)&=&\gamma,
		\\[0,1cm]
		I(2;0,+\infty)&=&\gamma^2+{\pi^2\over 6},
		\\[0,1cm]
		I(3;0,+\infty)&=&2\zeta(3) + \gamma^3 + {\gamma \pi^2\over 2},
		\\[0,1cm]
		I(4;0,+\infty)&=&8\gamma \zeta(3) + \gamma^4 + \gamma^2 \pi^2 + {3 \pi^4\over 20},
		\\[0,1cm]
		I(5;0,+\infty)&=& 20\gamma^2\zeta(3) + {10 \pi^2 \zeta(3)\over 3} + 24\zeta(5) + \gamma^5 + {5\gamma^3 \pi^2\over 3} + {3 \gamma \pi^4\over 4},
		\end{array}
	\end{eqnarray}
the proof follows.
\end{proof}

For the variance of the BGumbel distribution
\begin{equation}\label{variance}
    {\rm Var}(X)=\mathbb{E}(X^2)-\big[\mathbb{E}(X)\big]^2,
\end{equation}
just replace (\ref{mean}) and (\ref{2moment}) in (\ref{variance}).

\begin{remark1}[Standardized moments]
Let $X\sim F_{\rm BG}(\cdot; \mu,\sigma,\delta)$ with $\mathbb{E}(X)$ and $\sqrt{{\rm Var}(X)}>0$, both finite.
Newton's binomial expansion gives
\begin{eqnarray}\label{exp-bin}
	\mathbb{E}\biggl[{X-\mathbb{E}(X)\over \sqrt{{\rm Var}(X)}}\, \biggr]^n
	=
	{(-1)^{n}\big[\mathbb{E}(X)\big]^{n} \over \big[{\rm Var}(X) \big]^{n/2} }\, \sum_{k=0}^{n}\binom{n}{k} (-1)^{-k}\, \big[\mathbb{E}(X)\big]^{-k}\, \mathbb{E}(X^k).
\end{eqnarray}
By combining \eqref{exp-bin}, Theorem \ref{car-moments}, identities in \eqref{improper-int} and the following relation
\begin{eqnarray*}
\begin{array}{lllll}
I(6;0,+\infty) = 20 \gamma (2 \gamma ^2 + \pi^2) \zeta(3) + 40 [\zeta(3)]^2 + 144 \gamma \zeta(5) + \gamma ^6 + {5 \gamma ^4 \pi^2\over 2} + {9 \gamma ^2 \pi^4\over 4} + {61 \pi^6\over 168},
\end{array}
\end{eqnarray*}
closed formulas for
skewness and  kurtosis of the random variable $X\sim F_{\rm BG}(\cdot; \mu,\sigma,\delta)$  it is possible to obtain.
\end{remark1}

\section{Graphical illustrations and simulation results} \label{Sec:4}
\noindent

\subsection{Graphical illustration}
\noindent

Here, the flexibility of the BG model is shown. Note that the  BG model can be unimodal or bimodal.
Figures \ref{F1}  and \ref{F2} show how the BG density function is influenced by the shape parameters $\delta$ and $\mu$, since $ \sigma $ is a scale parameter.
Figure \ref{F1} shows that the bimodality of the BG model is more evident the greater the absolute value of $ \delta $. The density tends to become unimodal when the values of $ \delta $ and $ \mu $ are far apart. In the bimodal case, the left mode is smaller and the opposite for the right mode as $ \mu $ increases, see Figure \ref{F2}. All graphics were generated with our bgumbel package, \cite{Brom}.
\begin{figure}[!htbp]
	\centering
	\includegraphics[width=0.73\linewidth]{mu1s2delta.png}
	\vspace{-0.8cm}
	\caption{BG density graphs for
		$\mu=1$, $\sigma=2$ and $\delta$ varying
		as shown in the caption.
	}
	\label{F1}
\end{figure}

\begin{figure}[!htbp]
	\centering
	\includegraphics[width=0.73\linewidth]{s2d1mu.png}
	\vspace{-0.8cm}
	\caption{BG density graphs for
		$\delta=1$, $\sigma=2$ and $\mu$ varying
		as shown in the caption.}
	\label{F2}
\end{figure}

\subsection{Simulation results}
\noindent

In this section, we compare the sample mean and  variance  with  the  population mean and variance  (\ref{mean}) and (\ref{variance}). In addition,   we compared the cumulative distribution function given in (\ref{cdfbgev2-1}) with the empirical distribution. For that, we present a Markov chain Monte Carlo (MCMC) simulation study with various sample sizes.
In the MCMC simulation method we considered the Metropolis-Hastings  method  as pseudo-random numbers (PRN) generator \cite{metropolis},\cite{hastings}.
We chose this method instead of the inverse transform method, because the  BG cumulative distribution (\ref{CDF}) does not admit analytical inversion.
To generate  PRN  was used the MCMCpack package \cite{MCMCpack}  available in the R program \cite{R}.
The mean, variance  and the corresponding bias of the sample estimates  were computed over $10^5$ iterations of MCMC. These results are shown in
Tables \ref{comparativemoments}.
The performance of the MCMC algorithm was tested by varying the number of iterations, n.
Graphically, the convergence of the Markov Chain is shown in Figure  \ref{setparameters1}, for the first set of parameters in Table \ref{comparativemoments}.
For the other parameters sets , in the Table \ref{comparativemoments},
the performance of the algorithm is illustrated in  Appendix A, Figures \ref{figa1} - \ref{figa9}.  The value of n varies from 1000 to 100000 for each parameters set.
In all these figures the transition probability density function (TPDF) ,defined by the MCMCpack package, is in blue and the estacionary density in red.
We can conclude that the algorithm, \cite{Brom}, is efficient for n greater than
100000.
\begin{table}[!htbp]
	\centering
	\caption{ Comparison between the sample moments and population moments ($n = 10^5$).}

	\begin{tabular}{cccrrrccc}
		\hline
		$\mu$ & $\sigma$ & $\delta$ & sample mean &   $E(X)$ & Bias(mean) &  variance sample & $Var(X)$ & Bias (variance)   \\
		\hline
		$-$2 & 1 & $-$1 & $-$1.0931 & $-$1.0640 & $-$0.0291 & 4.9268 & 5.0126 & $-$0.0858
		\\
		$-$1 & 2 & $-$1 & 3.9504 & 4.0170 & $-$0.0666 & 17.126 & 18.016 & $-$0.8902
		\\
		$-$1 & 2 & $-$2 & 3.9901 & 3.9909 & $-$0.0008 & 21.032 & 21.575 & $-$0.5435
		\\
		$-$2 & 2 & $-$1 & 2.0065 & 1.9512 & 0.0553 & 24.104 & 24.592 & $-$0.4883
		\\
		\hline
	\end{tabular}
	\label{comparativemoments}
\end{table}

\begin{figure}[!htbp]
	\centering
	\includegraphics[width=0.73\linewidth]{convergencia.png}
	\vspace{-1cm}
	\caption{  Transition probability density function (TPDF)(left) and  transition cumulative distribution function (TCDF)(right), varying $n$ from $10^3$ to $10^5$.}
	\label{setparameters1}
\end{figure}

\section{Maximum likelihood estimation}
\label{Sec:5}
\noindent

In this section, we determine the maximum likelihood estimates (MLEs) of the parameters of the BG distribution.
Let $X\sim F_{\rm BG}(\cdot; \mu,\sigma,\delta)$ be a random variable with PDF $f _{\rm BG} (x; \Theta) $ defined in \eqref{pdfbgev2}, where $\Theta=(\mu,\sigma,\delta)$. Let $ X_1, \dots, X_n $ be a random sample of $X$ and
$x= (x_1, \dots, x_n) $ the corresponding observed values of the random sample $ X_1, \dots, X_n $.
The log-likelihood function  for $\Theta=(\mu, \sigma, \delta)$ is given by
\begin{align}\label{fv2}
\! \ell(\Theta;x)
=
-n\ln Z_\delta
-
n\ln \sigma
+
\sum_{i=1}^{n}\left\{
\ln\big[(1-\delta x_i)^2+1\big]
-
\Big(\frac{x_i-\mu}{\sigma}\Big)- \exp\Big[-\Big(\frac{x_i-\mu}{\sigma} \Big)\Big] \right\}.
\end{align}

The first-order partial derivatives of $ Z_{\delta} $ are given by
\begin{align*
& \textstyle
\frac{\partial Z_{\delta}}{\partial \mu}
= \textstyle
2\delta\big[\delta(\mu+\sigma\gamma)-1\big];
\\
& \textstyle
\frac{\partial Z_{\delta}}{\partial \sigma}
=
\frac{\sigma\delta \pi^2}{3}
+
2\delta\gamma\big[\delta(\mu+\sigma\gamma)-1\big];
\\
& \textstyle
\frac{\partial Z_{\delta}}{\partial \delta}
=
\frac{\sigma\delta \pi^2}{3}
+
2\big[\delta(\mu+\sigma\gamma)-1\big](\mu+\sigma\gamma).
\end{align*}
Then, the mle of $\mu, \sigma, \delta$ are the solutions of the following system of equations
\begin{align*
\frac{\partial \ell(\Theta;x)}{\partial \mu}&= -\frac{n}{Z_{\delta}}\frac{\partial Z_{\delta}}{\partial \mu}+  \frac{n}{\sigma} -\frac{1}{\sigma}\sum_{i=1}^{n}
\exp\Big[-\Big(\frac{x_i-\mu}{\sigma} \Big)\Big]=0;
\\
\frac{\partial \ell(\Theta;x)}{\partial \sigma}
&=
-\frac{n}{Z_{\delta}}\frac{\partial Z_{\delta}}{\partial \sigma}
-
\frac{n}{\sigma}
-
\frac{1}{\sigma^2}\sum_{i=1}^{n}
(x_i - \mu)
\left\{1-\exp\Big[-\Big(\frac{x_i-\mu}{\sigma} \Big)\Big] \right\}=0;
\\
\frac{\partial \ell(\Theta;x)}{\partial \delta}
&=
-\frac{n}{Z_{\delta}}
\frac{\partial Z_{\delta}}{\partial \delta}
-2
\sum_{i=1}^{n}
{x_i
	(1-\delta x_i)\, \over
	(1-\delta x_i)^2 +1}
=0.
\end{align*}

The MLEs  $\widehat\mu, \widehat\sigma$ and $\widehat\delta$ of $\mu, \sigma$ and $\delta$
are defined as the values of $\widehat\mu, \widehat\sigma$ and $\widehat\delta$ that maximize the log-likelihood
function in (\ref{fv2}). There will be, in general, no closed form for the MLE
and their obtention will need, in practice, numerical methods.

Since the second order partial derivatives of $ Z_{\delta} $ are
\begin{align*
\begin{array}{lllll}
&
\frac{\partial^2 Z_{\delta}}{\partial \mu^2}
= 2\delta^2;
&
\frac{\partial^2 Z_{\delta}}{\partial \sigma^2}
= \frac{\delta \pi^2}{3}+2\delta^2\gamma^2;
\\[0,2cm]
&
\frac{\partial^2 Z_{\delta}}{\partial \delta^2}
= \frac{\sigma \pi^2}{3}+2(\mu+\sigma\gamma)^2;
&
\frac{\partial^2 Z_{\delta}}{\partial \mu \partial\sigma}
=
\frac{\partial^2 Z_{\delta}}{\partial\sigma \partial \mu}
=
2\delta^2\gamma;
\\[0,2cm]
&
\frac{\partial^2 Z_{\delta}}{\partial \mu \partial\delta}
=
\frac{\partial^2 Z_{\delta}}{\partial\delta \partial \mu}
=
4\delta(\mu+\sigma\gamma);
&
\frac{\partial^2 Z_{\delta}}{\partial \sigma \partial \delta}
=
\frac{\partial^2 Z_{\delta}}{\partial \delta \partial \sigma}
=
\frac{\sigma \pi^2}{3}+ 4\delta\gamma(\mu+\sigma\gamma);
\end{array}
\end{align*}
the second-order partial derivatives of the log-likelihood function  $\ell(\Theta;x)$ are given by
\begin{align*
\frac{\partial^2 \ell(\Theta;x)}{\partial \mu^2}
&=
-D_{\mu,\mu}(\Theta;n)
-
\frac{1}{\sigma^2}
\sum_{i=1}^{n} \exp\Big[-\Big(\frac{x_i-\mu}{\sigma} \Big)\Big];
\\
\frac{\partial^2 \ell(\Theta;x)}{\partial \sigma^2}
&=
-D_{\sigma,\sigma}(\Theta;n)
+
\frac{n}{\sigma^2}
+
\frac{1}{\sigma^3}
\sum_{i=1}^{n}
(x_i - \mu)
\left\{
2- \Big[2-\Big(\frac{x_i-\mu}{\sigma}\Big) \Big]  \exp\Big[-\Big(\frac{x_i-\mu}{\sigma} \Big)\Big]
\right\}
;
\\
\frac{\partial^2 \ell(\Theta;x)}{\partial \delta^2}
&=
-D_{\delta,\delta}(\Theta;n)
-2
\sum_{i=1}^{n}
{x_i^2 \big[(1-\delta x_i)^2 -1\big] \over
	\big[(1-\delta x_i)^2 +1\big]^2}.
\end{align*}
Already, the second-order mixed derivatives of $\ell(\Theta;x)$ can be written as
\begin{align*
\frac{\partial^2 \ell(\Theta;x)}{\partial \mu \partial \sigma}
&=
\frac{\partial^2 \ell(\Theta;x)}{\partial \sigma \partial \mu}
=
-D_{\mu,\sigma}(\Theta;n)
-
\frac{n}{\sigma^2}
+
\frac{1}{\sigma^2}
\sum_{i=1}^{n} \Big[1-\Big(\frac{x_i-\mu}{\sigma}\Big) \Big]  \exp\Big[-\Big(\frac{x_i-\mu}{\sigma} \Big)\Big];
\\
\frac{\partial^2 \ell(\Theta;x)}{\partial \mu \partial \delta}
&=
\frac{\partial^2 \ell(\Theta;x)}{\partial \delta \partial \mu }
=
-D_{\mu,\delta}(\Theta;n);
\\
\frac{\partial^2 \ell(\Theta;x)}{\partial\sigma \partial \delta}
&=
\frac{\partial^2 \ell(\Theta;x)}{ \partial \delta \partial\sigma}
=
-D_{\sigma,\delta}(\Theta;n),
\end{align*}
where
\begin{align}\label{D-def}
\textstyle
D_{u,v}(\Theta;n)=\frac{\partial}{\partial u} \big(\frac{n}{Z_{\delta}}\frac{\partial Z_{\delta}}{\partial v} \big)
=
\frac{n}{Z_{\delta}}
\big(
\frac{\partial^2 Z_{\delta}}{\partial u\partial v}
-
{1\over Z_{\delta}}\frac{\partial Z_{\delta}}{\partial u} \frac{\partial Z_{\delta}}{\partial v}
\big), \quad u,v\in\{\mu,\sigma,  \delta\}.
\end{align}

Thus, the elements of the Fisher information matrix $I_X(\Theta)$ are defined by
\begin{eqnarray*}
	[I_X(\Theta)]_{jk}=\mathbb{E}\biggl[{\partial \ln f_{\rm BG}({X};{\Theta})\over \partial\theta_j}\ {\partial \ln f_{\rm BG}({X};{\Theta})\over \partial\theta_k}\biggr],
\end{eqnarray*}
for $\theta_j,\theta_k\in\{\mu,\sigma,  \delta\}$ and $j,k=1,2,3$.  Under known regularity conditions,   the elements $[I_X(\Theta)]_{jk}$ are written as
$\mathbb{E}\big[-{\partial^2 \ln f_{\rm BG}({X};{\Theta})\over \partial\theta_j\partial\theta_k}\big]$.
Hence, by considering the following notations:
\begin{eqnarray*}
	\begin{array}{lllll}
		F_1(X)&=& \exp\big[{-\big(\frac{X-\mu}{\sigma}\big)}\big],
		\\[0,3cm]
		F_2(X)&=&
		\big[1-\big(\frac{X-\mu}{\sigma}\big)\big]
		\exp\big[{-\big(\frac{X-\mu}{\sigma}\big)}\big],
		\\[0,3cm]
		F_3(X)&=&
		(X - \mu)
		\big\{
		2-\big[2-\big(\frac{X-\mu}{\sigma}\big) \big]
		\exp\big[{-\big(\frac{X-\mu}{\sigma}\big)}\big]
		\big\},
		\\[0,3cm]
		F_4(X)&=&
		{X^2 \big[(1-\delta X)^2 -1\big] /
			\big[(1-\delta X)^2 +1\big]^2},
	\end{array}
\end{eqnarray*}
we get
\begin{align*}
I_X(\Theta)=
\scalemath{0.95}{
	\begin{bmatrix}
	D_{\mu,\mu}(\Theta;1) + \frac{1}{\sigma^2} \mathbb{E}[F_1(X)]
	&
	D_{\mu,\sigma}(\Theta;1)
	+
	\frac{1}{\sigma^2}
	-
	\frac{1}{\sigma^2} \mathbb{E}[F_2(X)]
	&
	D_{\mu,\delta}(\Theta;1)
	\\[0,3cm]
	D_{\mu,\sigma}(\Theta;1)
	+
	\frac{1}{\sigma^2}
	-
	\frac{1}{\sigma^2} \mathbb{E}[F_2(X)]
	&
	D_{\sigma,\sigma}(\Theta;1)
	-
	\frac{1}{\sigma^2}
	-
	\frac{1}{\sigma^3} \mathbb{E}[F_3(X)]
	&
	D_{\sigma,\delta}(\Theta;1)
	\\[0,3cm]
	D_{\mu,\delta}(\Theta;1)
	&
	D_{\sigma,\delta}(\Theta;1)
	&
	D_{\delta,\delta}(\Theta;1)
	+
	2\mathbb{E}[F_4(X)] \
	\end{bmatrix}
},
\end{align*}
where 	$D_{u,v}(\Theta;n)$ is as in\eqref{D-def}.
We emphasize that, by using Theorem \ref{mgf-1} and Corollary \ref{mgf}, closed expressions for the expectations $\mathbb{E}[F_1(X)]$, $\mathbb{E}[F_2(X)]$ and $\mathbb{E}[F_3(X)]$ can be found. Furthermore, by using Theorem \ref{car-moments}, a simple argument shows that $F_4(X)$ is an integrable random variable.

\section{Real-world data analysis} \label{Sec:6}
\noindent

In this section, we used the BG model to fit one data set coming from  daily  pressure observations of the state of Mato Grosso do Sul-Brazil,
during the period of the year 2015 to 2020. The data series employed were taken from Corumbá automatic station of INMET (Instituto Nacional de Meteorologia) at https://portal.inmet.gov.br/dadoshistoricos. The required numerical evaluations are
implemented using the R software \cite{R}, \cite{hastings}, and \cite{MCMCpack}. The maximum likelihood estimates of the parameters were obtained  as in Section \ref{Sec:5}, using the bgumbel package \cite{Brom}.

For a random sample of the pressure $\{X_i\}_{t=1}^{T}$, $T=1774$, we fit their maximum values by
Gumbel and BG models.
For this, we used the maximum block technique. That is,
we provide $\tau=29$ non-overlapping subsamples of length $N=60$; $\{m_i\}_{i=1}^{\tau}$, where $m_i=\max\{x_{(i-1)N+1} \dots x_{i N + 1}\}$, \ $\forall i=1, \ldots, \tau=[T/N]$ ($[.]$ denotes the integer  part ). We applied Ljung – Box's test \cite{LBox} for verifying the null hypothesis of serial independence of the new sample of  maxima.
The test statistics did not reject the null hypothesis at the significance level of $1,7\%$ for the $28$ blocks of size $N=60$ and  the last of size $34$.

The descriptive statistics of  sample $\{m_i\}_{i=1}^{\tau}$ and the sample centered by the  mean are shown in Table \ref{descriptive}.
\begin{table}[!htbp]
	\centering
	\caption{ Descriptive statistics}

	\begin{tabular}{cccccc}
		\hline
		Distribution & Mean & Median & Maximum & Minimum & Std Dev \\

		\hline

		Extreme values & 1009.2 & 1010.0 & 1017.9 & 1001.1 & 4.9301 \\

		Centralized extreme values & 0.0000 & 0.7893 & 8.7393 & $-$8.0607 & 4.9301 \\
		\hline
	\end{tabular}
	\label{descriptive}
\end{table}
The parameter estimates and their corresponding standard error estimates (SE) from the BG and Gumbel models are shown in Table \ref{estimates}.
The results of goodness-of-fit tests based on the Kolmogorov–Smirnov (KS) test, Akaike information criterion (AIC) and Bayesian information criterion (BIC)  indicate that the BG model is a better fit, judging on the basis of $p$-values and  the lowest value of the AIC and BIC, see Table \ref{estimates}. The Figures \ref{fitdata} and \ref{qqdata} also indicates that the adjustment of the data by the BG model is better than the simple Gumbel model.

\begin{table}[!htbp]
	\centering
	\caption{Parameters estimates of Gumbel and BG models.}

	\begin{tabular}{ccrcccc}
		\hline

		Model & Parameters & Estimate & SE & ks $p$-value & AIC & BIC\\

		\hline

		& $\mu$ & $-$3.6972 & 0.4613 & \\

		BG & $\sigma$ & 2.4661 & 0.2222 & 0.8239 & 169.8228 & 173.8194\\

		& $\delta$ & $-$0.4128 & 0.1220 & \\ \\

		Gumbel & $\mu$ & $-$2.4080 & 0.8667 & 0.6576 & 173.2287 & 175.8932\\

		& $\beta$ & 4.3326 & 0.6405 &
		\\
		\hline
	\end{tabular}
		\label{estimates}
\end{table}

\begin{figure}[!htbp]
	\centering
	\includegraphics[width=0.8\linewidth]{fitpressure.png}
	\caption{On the left: centralized extreme values histogram versus fitted BG and Gumbel models. On the right: empirical cdf versus theorical cdf of BG and Gumbel models.}
	\label{fitdata}
\end{figure}

\begin{figure}[!htbp]
	\centering
	\includegraphics[width=0.8\linewidth]{qqplotpressure.png}

	\caption{  QQ-plot  empirical versus  theoretical of  BG model. }
	\label{qqdata}
\end{figure}

\section{Conclusions} \label{Sec:7}
\noindent

In this paper, we proposed an extension to the Gumbel distribution  by using a quadratic transformation technique used to generate bimodal functions
produced due to using the quadratic expression, with an additional bimodality parameter
which modifies the mode of the distribution, composing as a alternative models for single
maxima events. In this generalization, the Gumbel distribution appears as a particular case.
We provide a mathematical treatment of the new
model including the mode, bimodality, moment generating function and moments.
We performed
the modelling under a frequentist approach and the estimation of the parameters was proposed
using the maximum likelihood estimation.
Finally, we have performed a statistical modeling with real data by using
the new proposed model in the article.
The application demonstrated the practical relevance of the new model, which also showed the advantage of Gumbel model.

\paragraph{Acknowledgements}
This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) (Finance Code 001).

\paragraph{Disclosure statement}
There are no conflicts of interest to disclose.

redpajama_set_name: RedPajamaArXiv


text:
Q: Extract values for multiple keys from list of dictionary I am new to Python and looking for a little help. I have list of dictionary as follows:
data = [
    {'device_id': 'D11', 'ipv4': '1.1.1.1'},
    {'device_id': 'D42', 'ipv4': '1.1.1.2'},
    {'device_id': 'D32', 'hostname': 'MVPQ021'},
    {'device_id': 'D94', 'ipv6': '2001:0db8:0:7334'}
]

I need to fetch only list of IP address as follows:
['1.1.1.1', '1.1.1.2', '2001:0db8:0:7334']

I have tried the following that gives me desired result:
result = []

    for x in data:
        if 'ipv4' in x.keys():
            result.append(x['ipv4'])
            continue
        if 'ipv6' in x.keys():
            result.append(x['ipv6'])

However, for a very long list e.g with 1000+ elements, this solution is not very efficient.
Is there any optimized way to filter out only the ipv4 and ipv6 values without iterating each element in a list?

A: Assuming you are using Python 3.8+, you can take advantage of the := (walrus operator) as follows, and you can complete that in one list comprehension:
data = [
    {'device_id': 'D11', 'ipv4': '1.1.1.1'},
    {'device_id': 'D42', 'ipv4': '1.1.1.2'},
    {'device_id': 'D32', 'hostname': 'MVPQ021'},
    {'device_id': 'D94', 'ipv6': '2001:0db8:0:7334'}
]
result = [
    ip_address for e in data
    if (ip_address := e.get('ipv4') or e.get('ipv6')) is not None
]

Explanation:

*

*For each dictionary in the list, you are trying to get the value for either key 'ipv4' or 'ipv6' and store it in ip_address.

*If there is no value for both, it will skip that element.

A: Change x.keys() to x, you'll gain about 20-30% regarding my tests.
for x in data:
    if 'ipv4' in x:
        result.append(x['ipv4'])
        continue
    if 'ipv6' in x:
        result.append(x['ipv6'])

Some perf for me

*

*10M in 3.2sec

*50M in 17sec

A: Try more functional style one liner:
ip_list = list(filter(None, map(lambda i: i.get('ipv4', i.get('ipv6')), data)))

redpajama_set_name: RedPajamaStackExchange


Wellcome to craescuela.net. A brand-new project related to the use of new technologies of information with children aged between 3 and 9 years old.If you want to navegate in the site,please choose any of the head menus.
Please note virtual tales, sound and video are all in the original language, either Spanish or Galician.